a6eacab9 by Jeff Balicki

first commit

0 parents
Showing 87 changed files with 3079 additions and 0 deletions
1 APP_ENV=local
2 APP_DEBUG=true
3 APP_KEY=SomeRandomString
4 APP_URL=http://localhost
5
6 DB_CONNECTION=mysql
7 DB_HOST=127.0.0.1
8 DB_PORT=3306
9 DB_DATABASE=homestead
10 DB_USERNAME=homestead
11 DB_PASSWORD=secret
12
13 CACHE_DRIVER=file
14 SESSION_DRIVER=file
15 QUEUE_DRIVER=sync
16
17 REDIS_HOST=127.0.0.1
18 REDIS_PASSWORD=null
19 REDIS_PORT=6379
20
21 MAIL_DRIVER=smtp
22 MAIL_HOST=mailtrap.io
23 MAIL_PORT=2525
24 MAIL_USERNAME=null
25 MAIL_PASSWORD=null
26 MAIL_ENCRYPTION=null
1 * text=auto
2 *.css linguist-vendored
3 *.less linguist-vendored
1 /vendor
2 /node_modules
3 /public/storage
4 Homestead.yaml
5 Homestead.json
6 .env
1 1460143368
...\ No newline at end of file ...\ No newline at end of file
1 502
...\ No newline at end of file ...\ No newline at end of file
1 c83c3e4a-357a-436c-9821-524ee42f33bb
...\ No newline at end of file ...\ No newline at end of file
1 832de9f718604f77a15ce5215a0d8e41
...\ No newline at end of file ...\ No newline at end of file
1 require 'json'
2 require 'yaml'
3
4 VAGRANTFILE_API_VERSION ||= "2"
5 confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__))
6
7 homesteadYamlPath = "Homestead.yaml"
8 homesteadJsonPath = "Homestead.json"
9 afterScriptPath = "after.sh"
10 aliasesPath = "aliases"
11
12 require File.expand_path(confDir + '/scripts/homestead.rb')
13
14 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
15 if File.exists? aliasesPath then
16 config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
17 end
18
19 if File.exists? homesteadYamlPath then
20 Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
21 elsif File.exists? homesteadJsonPath then
22 Homestead.configure(config, JSON.parse(File.read(homesteadJsonPath)))
23 end
24
25 if File.exists? afterScriptPath then
26 config.vm.provision "shell", path: afterScriptPath
27 end
28 end
1 <?php
2
3 namespace App\Console\Commands;
4
5 use Illuminate\Console\Command;
6 use Illuminate\Foundation\Inspiring;
7
8 class Inspire extends Command
9 {
10 /**
11 * The name and signature of the console command.
12 *
13 * @var string
14 */
15 protected $signature = 'inspire';
16
17 /**
18 * The console command description.
19 *
20 * @var string
21 */
22 protected $description = 'Display an inspiring quote';
23
24 /**
25 * Execute the console command.
26 *
27 * @return mixed
28 */
29 public function handle()
30 {
31 $this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
32 }
33 }
1 <?php
2
3 namespace App\Console;
4
5 use Illuminate\Console\Scheduling\Schedule;
6 use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
7
8 class Kernel extends ConsoleKernel
9 {
10 /**
11 * The Artisan commands provided by your application.
12 *
13 * @var array
14 */
15 protected $commands = [
16 // Commands\Inspire::class,
17 ];
18
19 /**
20 * Define the application's command schedule.
21 *
22 * @param \Illuminate\Console\Scheduling\Schedule $schedule
23 * @return void
24 */
25 protected function schedule(Schedule $schedule)
26 {
27 // $schedule->command('inspire')
28 // ->hourly();
29 }
30 }
1 <?php
2
3 namespace App\Events;
4
5 abstract class Event
6 {
7 //
8 }
1 <?php
2
3 namespace App\Exceptions;
4
5 use Exception;
6 use Illuminate\Validation\ValidationException;
7 use Illuminate\Auth\Access\AuthorizationException;
8 use Illuminate\Database\Eloquent\ModelNotFoundException;
9 use Symfony\Component\HttpKernel\Exception\HttpException;
10 use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
11
12 class Handler extends ExceptionHandler
13 {
14 /**
15 * A list of the exception types that should not be reported.
16 *
17 * @var array
18 */
19 protected $dontReport = [
20 AuthorizationException::class,
21 HttpException::class,
22 ModelNotFoundException::class,
23 ValidationException::class,
24 ];
25
26 /**
27 * Report or log an exception.
28 *
29 * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
30 *
31 * @param \Exception $e
32 * @return void
33 */
34 public function report(Exception $e)
35 {
36 parent::report($e);
37 }
38
39 /**
40 * Render an exception into an HTTP response.
41 *
42 * @param \Illuminate\Http\Request $request
43 * @param \Exception $e
44 * @return \Illuminate\Http\Response
45 */
46 public function render($request, Exception $e)
47 {
48 return parent::render($request, $e);
49 }
50 }
1 <?php
2
3 namespace App\Http\Controllers;
4
5 use Illuminate\Http\Request;
6 use App\Http\Requests;
7 use App\Http\Controllers;
8 use App\pdfModel;
9 use URL;
10 use Storage;
11 use Response;
12 use File;
13 Use PDF;
14 use Illuminate\Support\Facades\Input;
15 use Intervention\Image\Facades\Image;
16 use Illuminate\Support\Facades\Facade;
17 use League\Flysystem\Filesystem;
18 use Curl\Curl;
19 use Imagick;
20
21
22
23
24 class ApiController extends Controller
25 {
26
27
28 //Takes json data and passes it to model and grabs related files.
29
30 public function insert($json)
31 {
32 $json = '{"pdf":[{"name":"SISKINDS_test file","folder":"SISKINDS_test","pdfLocation":"https://www.polyu.edu.hk/iaee/files/pdf-sample.pdf"}],"changes":[{"label":"none","locationUp":"400","locationRight":90,"pages":"1","content":"LOGO_text_black.jpg","z-index":null,"idstylesPDF":1,"order":"2","style":null,"idchange_typePDF":2,"change_type":"2","fileLocation":"http://www.arielpremium.com/images/vsample_images/LOGO_text_black.jpg"},{"label":"text style","locationUp":"60","locationRight":290,"pages":"1","content":"519.660.2121 siskinds.com\/change","z-index":null,"idstylesPDF":2,"order":"1","style":"a:3:{s:11:\"font-family\";s:11:\"TradeGothic\";s:9:\"font-size\";s:2:\"14\";s:10:\"font-color\";s:14:\"cmyk 0 0 0.5 0\";}","idchange_typePDF":1,"change_type":"1"}]}';
33
34 $apiCallId = new pdfModel();
35 $apiCallId = $apiCallId->addApiCall('1',$json);
36 //$apiCallId = "3";
37 $pdfId = new pdfModel();
38 $pdfId = $pdfId->addPdf($apiCallId, $json);
39 $json = json_decode($json);
40
41
42
43
44 $storagePath = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix();
45 $folder = str_replace(' ', '-', $json->pdf[0]->label); // Replaces all spaces with hyphens.
46 $folder = preg_replace('/[^A-Za-z0-9\-]/', '', $folder);
47
48 if(!is_dir($storagePath . $folder . '/')){
49 mkdir($storagePath . $folder . '/');
50 }
51
52 if (isset($json->pdf[0]->pdfLocation)) {
53
54 $pdfLocation = $json->pdf[0]->pdfLocation;
55 $file = explode('/', $pdfLocation);
56 $curl = new Curl();
57 $curl->download($pdfLocation, $storagePath . $folder . '/' . end($file));
58 $curl->close();
59 $im = new Imagick();
60 $im->setResolution(300, 300); //set the resolution of the resulting jpg
61 $im->readImage($storagePath . $folder . '/' . end($file)); //[0] for the first page
62 $im->setImageFormat('jpg');
63 $fileName = end($file);
64 $fileName = explode('.', $fileName);
65 $im->writeImage($storagePath . $folder . '/' . $fileName[0].'.jpg');
66
67 }
68 foreach ($json->changes as $change) {
69 if (isset($change->fileLocation)) {
70 $fileLocation = $change->fileLocation;
71 $file = explode('/', $fileLocation);
72 $curl = new Curl();
73 $curl->download($fileLocation, $storagePath . $folder . '/' . end($file));
74 $curl->close();
75
76 }
77
78
79 }
80
81 }
82
83
84
85 public function getList($json)
86 {
87
88 $rows = new pdfModel();
89 $rows = $rows->getList($json)->get();
90 $rows = json_encode($rows);
91 var_dump($rows);
92
93 }
94 public function getPdf($json)
95 {
96
97 $rows = new pdfModel();
98 $rows = $rows->getpdf($json)->get();
99 $rows = json_encode($rows);
100 var_dump($rows);
101
102 }
103 }
1 <?php
2
3 namespace App\Http\Controllers\Auth;
4
5 use App\User;
6 use Validator;
7 use App\Http\Controllers\Controller;
8 use Illuminate\Foundation\Auth\ThrottlesLogins;
9 use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
10
11 class AuthController extends Controller
12 {
13 /*
14 |--------------------------------------------------------------------------
15 | Registration & Login Controller
16 |--------------------------------------------------------------------------
17 |
18 | This controller handles the registration of new users, as well as the
19 | authentication of existing users. By default, this controller uses
20 | a simple trait to add these behaviors. Why don't you explore it?
21 |
22 */
23
24 use AuthenticatesAndRegistersUsers, ThrottlesLogins;
25
26 /**
27 * Where to redirect users after login / registration.
28 *
29 * @var string
30 */
31 protected $redirectTo = '/';
32
33 /**
34 * Create a new authentication controller instance.
35 *
36 * @return void
37 */
38 public function __construct()
39 {
40 $this->middleware($this->guestMiddleware(), ['except' => 'logout']);
41 }
42
43 /**
44 * Get a validator for an incoming registration request.
45 *
46 * @param array $data
47 * @return \Illuminate\Contracts\Validation\Validator
48 */
49 protected function validator(array $data)
50 {
51 return Validator::make($data, [
52 'name' => 'required|max:255',
53 'email' => 'required|email|max:255|unique:users',
54 'password' => 'required|min:6|confirmed',
55 ]);
56 }
57
58 /**
59 * Create a new user instance after a valid registration.
60 *
61 * @param array $data
62 * @return User
63 */
64 protected function create(array $data)
65 {
66 return User::create([
67 'name' => $data['name'],
68 'email' => $data['email'],
69 'password' => bcrypt($data['password']),
70 ]);
71 }
72 }
1 <?php
2
3 namespace App\Http\Controllers\Auth;
4
5 use App\Http\Controllers\Controller;
6 use Illuminate\Foundation\Auth\ResetsPasswords;
7
8 class PasswordController extends Controller
9 {
10 /*
11 |--------------------------------------------------------------------------
12 | Password Reset Controller
13 |--------------------------------------------------------------------------
14 |
15 | This controller is responsible for handling password reset requests
16 | and uses a simple trait to include this behavior. You're free to
17 | explore this trait and override any methods you wish to tweak.
18 |
19 */
20
21 use ResetsPasswords;
22
23 /**
24 * Create a new password controller instance.
25 *
26 * @return void
27 */
28 public function __construct()
29 {
30 $this->middleware('guest');
31 }
32 }
1 <?php
2
3 namespace App\Http\Controllers;
4
5 use Illuminate\Foundation\Bus\DispatchesJobs;
6 use Illuminate\Routing\Controller as BaseController;
7 use Illuminate\Foundation\Validation\ValidatesRequests;
8 use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
9 use Illuminate\Foundation\Auth\Access\AuthorizesResources;
10
11 class Controller extends BaseController
12 {
13 use AuthorizesRequests, AuthorizesResources, DispatchesJobs, ValidatesRequests;
14 }
1 <?php
2
3 namespace App\Http\Controllers;
4
5 use Illuminate\Http\Request;
6 use App\Http\Requests;
7 use App\Http\Controllers;
8 use App\pdfModel;
9 use URL;
10 use Storage;
11 use Response;
12 use File;
13 Use PDF;
14 use Illuminate\Support\Facades\Input;
15 use Intervention\Image\Facades\Image;
16 use Illuminate\Support\Facades\Facade;
17 use League\Flysystem\Filesystem;
18 use pdflib;
19
20
21
22
23 class PdfController extends Controller
24 {
25
26 public function pdf($id)
27 {
28
29 $rows = new pdfModel();
30 $rows = $rows->getpdf($id)->get();
31 $folder = $rows[0]->folder;
32 $searchpath = "$folder";
33 $pdffile = $searchpath.'/'.$rows[0]->file;
34 $outfile="";
35 $title = "Test Pages";
36 $storagePath = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix();
37 $outfile = $storagePath.$searchpath."/new_".$rows[0]->file;
38
39 try {
40
41 $p = new pdflib();
42
43
44 $p->set_option("SearchPath={{" . $searchpath . "}}");
45
46 # This means we must check return values of load_font() etc.
47 $p->set_option("errorpolicy=return");
48
49 /* Enable the following line if you experience crashes on OS X
50 * (see PDFlib-in-PHP-HowTo.pdf for details):
51 * $p->set_option("usehostfonts=false");
52 */
53
54 /* all strings are expected as utf8 */
55 $p->set_option("stringformat=utf8");
56 if ($p->begin_document($outfile, "") == 0)
57 die("Error: " . $p->get_errmsg());
58
59 $p->set_info("Creator", "Rock Star Jeff");
60 $p->set_info("Title", $title );
61
62 /* Open the input PDF */
63 $response = $storagePath.$pdffile;
64
65 $indoc = $p->open_pdi_document( $response, "");
66 if ($indoc == 0)
67 die("Error: " . $p->get_errmsg());
68
69
70 $endpage = (int) $p->pcos_get_number($indoc, "length:pages");
71
72 /* Loop over all pages of the input document */
73 $pg=0;
74 for ($pageno = 1; $pageno <= $endpage; $pageno++) {
75 $page = $p->open_pdi_page($indoc, $pageno, "");
76
77
78 if ($page == 0)
79 die("Error: " . $p->get_errmsg());
80
81 /* Dummy page size; will be adjusted later */
82 $p->begin_page_ext(10, 10, "");
83
84 /* Place the imported page on the output page, and
85 * adjust the page size */
86
87 $p->fit_pdi_page($page, 0, 0, "adjustpage");
88
89
90 foreach($rows AS $row ) {
91 $pageNumber = $row->pages;
92 if($pageNumber == $pageno ) {
93
94 if ($row->change_type == 'text') {
95
96 //Get font var from row
97
98 $textline = $row->content;
99 $textLUp = $row->locationUp;
100 $textLRight = $row->locationRight;
101 $fontStyles = unserialize($row->style);
102
103 $fontFamily = $fontStyles["font-family"];
104 $fontSize = $fontStyles["font-size"];
105 if(isset($fontStyles["font-color"])) {
106 $fontColor = $fontStyles["font-color"];
107 }else{
108 $fontColor = 'cmyk 0.75 0.68 0.67 0.90';
109
110 }
111 /// Load and insert text and font
112
113 $p->set_option("FontOutline={" . $fontFamily . "=" . $storagePath . $folder . "/" . $fontFamily . ".otf}");
114 /* For PDFlib Lite: change "unicode" to "winansi" */
115 $font = $p->load_font($fontFamily, "unicode", "embedding");
116 if ($font == 0) {
117 die("Error: " . $p->get_errmsg());
118 }
119 $num_optlist = "fillcolor={".$fontColor." }";
120 $p->setfont($font, $fontSize);
121 $p->fit_textline($textline, $textLUp, $textLRight, $num_optlist);
122
123
124 } else if ($row->change_type == 'img') {
125
126 //Get image var from row
127
128 $imagefile = $row->folder . '/' . $row->content;
129 $imgLUp = $row->locationUp;
130 $imgLRight = $row->locationRight;
131
132 //Load and insert the images
133
134 $image = $p->load_image("auto", $storagePath . $imagefile, "");
135 if ($image == 0) {
136 die("Error: " . $p->get_errmsg());
137 }
138 $p->fit_image($image, $imgLUp, $imgLRight, "");
139
140
141 }
142 }
143
144
145 }
146
147 $p->close_pdi_page($page);
148
149 $p->end_page_ext("");
150 }
151
152 $p->end_document("");
153
154
155 /// To turn on pdf screen out put uncomment below lines and remove the text in $output="" Var
156
157 //$buf = $p->get_buffer();
158 //$len = strlen($buf);
159
160 //header("Content-type: application/pdf");
161 //header("Content-Length: $len");
162 //header("Content-Disposition: inline; filename=test_pages.pdf");
163 //print $buf;
164
165
166
167
168
169
170
171 }
172
173 catch (PDFlibException $e) {
174 die("PDFlib exception occurred:\n" .
175 "[" . $e->get_errnum() . "] " . $e->get_apiname() . ": " .
176 $e->get_errmsg() . "\n");
177 }
178 catch (Exception $e) {
179 die($e);
180 }
181
182 $p = 0;
183
184
185
186 }
187
188
189 }
1 <?php
2
3 namespace App\Http\Controllers;
4
5 use Illuminate\Http\Request;
6
7 use App\Http\Requests;
8
9 class testController extends Controller
10 {
11 //
12 }
1 <?php
2
3 namespace App\Http;
4
5 use Illuminate\Foundation\Http\Kernel as HttpKernel;
6
7 class Kernel extends HttpKernel
8 {
9 /**
10 * The application's global HTTP middleware stack.
11 *
12 * These middleware are run during every request to your application.
13 *
14 * @var array
15 */
16 protected $middleware = [
17 \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
18 ];
19
20 /**
21 * The application's route middleware groups.
22 *
23 * @var array
24 */
25 protected $middlewareGroups = [
26 'web' => [
27 \App\Http\Middleware\EncryptCookies::class,
28 \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
29 \Illuminate\Session\Middleware\StartSession::class,
30 \Illuminate\View\Middleware\ShareErrorsFromSession::class,
31 \App\Http\Middleware\VerifyCsrfToken::class,
32 ],
33
34 'api' => [
35 'throttle:60,1',
36 ],
37 ];
38
39 /**
40 * The application's route middleware.
41 *
42 * These middleware may be assigned to groups or used individually.
43 *
44 * @var array
45 */
46 protected $routeMiddleware = [
47 'auth' => \App\Http\Middleware\Authenticate::class,
48 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
49 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
50 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
51 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
52 ];
53 }
1 <?php
2
3 namespace App\Http\Middleware;
4
5 use Closure;
6 use Illuminate\Support\Facades\Auth;
7
8 class Authenticate
9 {
10 /**
11 * Handle an incoming request.
12 *
13 * @param \Illuminate\Http\Request $request
14 * @param \Closure $next
15 * @param string|null $guard
16 * @return mixed
17 */
18 public function handle($request, Closure $next, $guard = null)
19 {
20 if (Auth::guard($guard)->guest()) {
21 if ($request->ajax() || $request->wantsJson()) {
22 return response('Unauthorized.', 401);
23 } else {
24 return redirect()->guest('login');
25 }
26 }
27
28 return $next($request);
29 }
30 }
1 <?php
2
3 namespace App\Http\Middleware;
4
5 use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
6
7 class EncryptCookies extends BaseEncrypter
8 {
9 /**
10 * The names of the cookies that should not be encrypted.
11 *
12 * @var array
13 */
14 protected $except = [
15 //
16 ];
17 }
1 <?php
2
3 namespace App\Http\Middleware;
4
5 use Closure;
6 use Illuminate\Support\Facades\Auth;
7
8 class RedirectIfAuthenticated
9 {
10 /**
11 * Handle an incoming request.
12 *
13 * @param \Illuminate\Http\Request $request
14 * @param \Closure $next
15 * @param string|null $guard
16 * @return mixed
17 */
18 public function handle($request, Closure $next, $guard = null)
19 {
20 if (Auth::guard($guard)->check()) {
21 return redirect('/');
22 }
23
24 return $next($request);
25 }
26 }
1 <?php
2
3 namespace App\Http\Middleware;
4
5 use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
6
7 class VerifyCsrfToken extends BaseVerifier
8 {
9 /**
10 * The URIs that should be excluded from CSRF verification.
11 *
12 * @var array
13 */
14 protected $except = [
15 //
16 ];
17 }
1 <?php
2
3 namespace App\Http\Requests;
4
5 use Illuminate\Foundation\Http\FormRequest;
6
7 abstract class Request extends FormRequest
8 {
9 //
10 }
1 <?php
2
3 /*
4 |--------------------------------------------------------------------------
5 | Application Routes
6 |--------------------------------------------------------------------------
7 |
8 | Here is where you can register all of the routes for an application.
9 | It's a breeze. Simply tell Laravel the URIs it should respond to
10 | and give it the controller to call when that URI is requested.
11 |
12 */
13
14 Route::get('/', function () {
15 return view('welcome');
16 });
17
18
19 Route::get('pdf/{id}', 'PdfController@pdf');
20 Route::get('api/add/{json}', 'ApiController@insert');
21 Route::get('api/get-list/{json}', 'ApiController@getList');
22 Route::get('api/get-pdf/{json}', 'ApiController@getpdf');
23
1 <?php
2
3 namespace App\Jobs;
4
5 use Illuminate\Bus\Queueable;
6
7 abstract class Job
8 {
9 /*
10 |--------------------------------------------------------------------------
11 | Queueable Jobs
12 |--------------------------------------------------------------------------
13 |
14 | This job base class provides a central location to place any logic that
15 | is shared across all of your jobs. The trait included with the class
16 | provides access to the "onQueue" and "delay" queue helper methods.
17 |
18 */
19
20 use Queueable;
21 }
1 <?php
2
3 namespace App\Providers;
4
5 use Illuminate\Support\ServiceProvider;
6
7 class AppServiceProvider extends ServiceProvider
8 {
9 /**
10 * Bootstrap any application services.
11 *
12 * @return void
13 */
14 public function boot()
15 {
16 //
17 }
18
19 /**
20 * Register any application services.
21 *
22 * @return void
23 */
24 public function register()
25 {
26 //
27 }
28 }
1 <?php
2
3 namespace App\Providers;
4
5 use Illuminate\Contracts\Auth\Access\Gate as GateContract;
6 use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
7
8 class AuthServiceProvider extends ServiceProvider
9 {
10 /**
11 * The policy mappings for the application.
12 *
13 * @var array
14 */
15 protected $policies = [
16 'App\Model' => 'App\Policies\ModelPolicy',
17 ];
18
19 /**
20 * Register any application authentication / authorization services.
21 *
22 * @param \Illuminate\Contracts\Auth\Access\Gate $gate
23 * @return void
24 */
25 public function boot(GateContract $gate)
26 {
27 $this->registerPolicies($gate);
28
29 //
30 }
31 }
1 <?php
2
3 namespace App\Providers;
4
5 use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
6 use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
7
8 class EventServiceProvider extends ServiceProvider
9 {
10 /**
11 * The event listener mappings for the application.
12 *
13 * @var array
14 */
15 protected $listen = [
16 'App\Events\SomeEvent' => [
17 'App\Listeners\EventListener',
18 ],
19 ];
20
21 /**
22 * Register any other events for your application.
23 *
24 * @param \Illuminate\Contracts\Events\Dispatcher $events
25 * @return void
26 */
27 public function boot(DispatcherContract $events)
28 {
29 parent::boot($events);
30
31 //
32 }
33 }
1 <?php
2
3 namespace App\Providers;
4
5 use Illuminate\Routing\Router;
6 use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
7
8 class RouteServiceProvider extends ServiceProvider
9 {
10 /**
11 * This namespace is applied to your controller routes.
12 *
13 * In addition, it is set as the URL generator's root namespace.
14 *
15 * @var string
16 */
17 protected $namespace = 'App\Http\Controllers';
18
19 /**
20 * Define your route model bindings, pattern filters, etc.
21 *
22 * @param \Illuminate\Routing\Router $router
23 * @return void
24 */
25 public function boot(Router $router)
26 {
27 //
28
29 parent::boot($router);
30 }
31
32 /**
33 * Define the routes for the application.
34 *
35 * @param \Illuminate\Routing\Router $router
36 * @return void
37 */
38 public function map(Router $router)
39 {
40 $this->mapWebRoutes($router);
41
42 //
43 }
44
45 /**
46 * Define the "web" routes for the application.
47 *
48 * These routes all receive session state, CSRF protection, etc.
49 *
50 * @param \Illuminate\Routing\Router $router
51 * @return void
52 */
53 protected function mapWebRoutes(Router $router)
54 {
55 $router->group([
56 'namespace' => $this->namespace, 'middleware' => 'web',
57 ], function ($router) {
58 require app_path('Http/routes.php');
59 });
60 }
61 }
1 <?php
2
3 namespace App;
4
5 use Illuminate\Foundation\Auth\User as Authenticatable;
6
7 class User extends Authenticatable
8 {
9 /**
10 * The attributes that are mass assignable.
11 *
12 * @var array
13 */
14 protected $fillable = [
15 'name', 'email', 'password',
16 ];
17
18 /**
19 * The attributes that should be hidden for arrays.
20 *
21 * @var array
22 */
23 protected $hidden = [
24 'password', 'remember_token',
25 ];
26 }
1 <?php
2
3 namespace App;
4
5
6 use Illuminate\Database\Eloquent\Model;
7 use DB;
8
9 class pdfModel extends Model
10 {
11
12 // protected $table="pdf";
13 // protected $table="changesPDF";
14
15
16 ///returns all pdf data
17
18 public function getPdf($id){
19
20
21 $rows = DB::table('PDF')
22 ->join('changesPDF', 'PDF_idPDF', '=', 'idPDF')
23 ->join('stylesPDF', 'stylesPDF_idstylesPDF', '=', 'idstylesPDF')
24 ->join('change_typePDF', 'idchange_typePDF', '=', 'change_typePDF_idchange_typePDF')
25 ->where('pdf.idPDF','=', $id);
26
27
28 return $rows;
29 }
30 ///returns all all pdfs data for customer by id
31
32 public function getList($id){
33
34 $rows = DB::table('PDF')->where('pdf.custId','=', $id);
35
36 return $rows;
37 }
38
39
40 /// add a record of api calls
41
42 public function addApiCall($custId, $json){
43
44 $apiCallId = DB::table('apiCall')->insertGetId(
45 array('custId' => $custId, 'jsonRec' => $json)
46 );
47
48
49
50 return $apiCallId;
51 }
52
53
54 // add a pdf with options to be created
55
56 public function addPdf($apiCallId, $json){
57
58
59
60
61 $json = json_decode($json);
62 $folder = str_replace(' ', '-', $json->pdf[0]->name); // Replaces all spaces with hyphens.
63 $folder = preg_replace('/[^A-Za-z0-9\-]/', '', $folder);
64 $pdfLocation = $json->pdf[0]->pdfLocation;
65 $file = explode('/', $pdfLocation);
66 $fileName = end($file);
67 $fileName = explode('.', $fileName);
68
69 $pdfId = DB::table('PDF')->insertGetId(
70 array('name' => $json->pdf[0]->name, 'folder' => $folder, 'file' => end($file), 'apiCallId' => $apiCallId, 'image'=> $fileName[0].'.jpg')
71 );
72
73 foreach($json->changes as $change) {
74
75
76 $idstylesPDF = DB::table('stylesPDF')->insertGetId(
77 array('label' => $change->label, 'style' => $change->style)
78 );
79
80 $idchangesPDF = DB::table('changesPDF')->insertGetId(
81 array('PDF_idPDF' => $pdfId, 'change_typePDF_idchange_typePDF' => $change->change_type, 'stylesPDF_idstylesPDF' => $idstylesPDF, 'locationUp' => $change->locationUp, 'locationRight' => $change->locationRight, 'pages' => $change->pages, 'content' => $change->content, 'z-index' => '')
82 );
83
84 }
85
86
87
88
89 }
90
91 }
1 #!/usr/bin/env php
2 <?php
3
4 /*
5 |--------------------------------------------------------------------------
6 | Register The Auto Loader
7 |--------------------------------------------------------------------------
8 |
9 | Composer provides a convenient, automatically generated class loader
10 | for our application. We just need to utilize it! We'll require it
11 | into the script here so that we do not have to worry about the
12 | loading of any our classes "manually". Feels great to relax.
13 |
14 */
15
16 require __DIR__.'/bootstrap/autoload.php';
17
18 $app = require_once __DIR__.'/bootstrap/app.php';
19
20 /*
21 |--------------------------------------------------------------------------
22 | Run The Artisan Application
23 |--------------------------------------------------------------------------
24 |
25 | When we run the console application, the current CLI command will be
26 | executed in this console and the response sent back to a terminal
27 | or another output device for the developers. Here goes nothing!
28 |
29 */
30
31 $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
32
33 $status = $kernel->handle(
34 $input = new Symfony\Component\Console\Input\ArgvInput,
35 new Symfony\Component\Console\Output\ConsoleOutput
36 );
37
38 /*
39 |--------------------------------------------------------------------------
40 | Shutdown The Application
41 |--------------------------------------------------------------------------
42 |
43 | Once Artisan has finished running. We will fire off the shutdown events
44 | so that any final work may be done by the application before we shut
45 | down the process. This is the last thing to happen to the request.
46 |
47 */
48
49 $kernel->terminate($input, $status);
50
51 exit($status);
1 <?php
2
3 /*
4 |--------------------------------------------------------------------------
5 | Create The Application
6 |--------------------------------------------------------------------------
7 |
8 | The first thing we will do is create a new Laravel application instance
9 | which serves as the "glue" for all the components of Laravel, and is
10 | the IoC container for the system binding all of the various parts.
11 |
12 */
13
14 $app = new Illuminate\Foundation\Application(
15 realpath(__DIR__.'/../')
16 );
17
18 /*
19 |--------------------------------------------------------------------------
20 | Bind Important Interfaces
21 |--------------------------------------------------------------------------
22 |
23 | Next, we need to bind some important interfaces into the container so
24 | we will be able to resolve them when needed. The kernels serve the
25 | incoming requests to this application from both the web and CLI.
26 |
27 */
28
29 $app->singleton(
30 Illuminate\Contracts\Http\Kernel::class,
31 App\Http\Kernel::class
32 );
33
34 $app->singleton(
35 Illuminate\Contracts\Console\Kernel::class,
36 App\Console\Kernel::class
37 );
38
39 $app->singleton(
40 Illuminate\Contracts\Debug\ExceptionHandler::class,
41 App\Exceptions\Handler::class
42 );
43
44 /*
45 |--------------------------------------------------------------------------
46 | Return The Application
47 |--------------------------------------------------------------------------
48 |
49 | This script returns the application instance. The instance is given to
50 | the calling script so we can separate the building of the instances
51 | from the actual running of the application and sending responses.
52 |
53 */
54
55 return $app;
1 <?php
2
3 define('LARAVEL_START', microtime(true));
4
5 /*
6 |--------------------------------------------------------------------------
7 | Register The Composer Auto Loader
8 |--------------------------------------------------------------------------
9 |
10 | Composer provides a convenient, automatically generated class loader
11 | for our application. We just need to utilize it! We'll require it
12 | into the script here so that we do not have to worry about the
13 | loading of any our classes "manually". Feels great to relax.
14 |
15 */
16
17 require __DIR__.'/../vendor/autoload.php';
18
19 /*
20 |--------------------------------------------------------------------------
21 | Include The Compiled Class File
22 |--------------------------------------------------------------------------
23 |
24 | To dramatically increase your application's performance, you may use a
25 | compiled class file which contains all of the classes commonly used
26 | by a request. The Artisan "optimize" is used to create this file.
27 |
28 */
29
30 $compiledPath = __DIR__.'/cache/compiled.php';
31
32 if (file_exists($compiledPath)) {
33 require $compiledPath;
34 }
1 {
2 "name": "laravel/laravel",
3 "description": "The Laravel Framework.",
4 "keywords": ["framework", "laravel"],
5 "license": "MIT",
6 "type": "project",
7 "require": {
8 "php": ">=5.5.9",
9 "laravel/framework": "5.2.*",
10
11 "itbz/fpdf": "^1.7",
12 "barryvdh/laravel-snappy": "^0.3.0",
13 "vsmoraes/laravel-pdf": "^1.0",
14 "php-curl-class/php-curl-class": "^4.11"
15
16
17 },
18 "require-dev": {
19 "fzaninotto/faker": "~1.4",
20 "mockery/mockery": "0.9.*",
21 "phpunit/phpunit": "~4.0",
22 "symfony/css-selector": "2.8.*|3.0.*",
23 "symfony/dom-crawler": "2.8.*|3.0.*",
24
25 "laravel/homestead": "^3.0"
26
27 },
28 "autoload": {
29 "classmap": [
30 "database"
31 ],
32 "psr-4": {
33 "App\\": "app/"
34 }
35 },
36 "autoload-dev": {
37 "classmap": [
38 "tests/TestCase.php"
39
40 ]
41 },
42 "scripts": {
43 "post-root-package-install": [
44 "php -r \"copy('.env.example', '.env');\""
45 ],
46 "post-create-project-cmd": [
47 "php artisan key:generate"
48 ],
49 "post-install-cmd": [
50 "Illuminate\\Foundation\\ComposerScripts::postInstall",
51 "php artisan optimize"
52 ],
53 "post-update-cmd": [
54 "Illuminate\\Foundation\\ComposerScripts::postUpdate",
55 "php artisan optimize"
56 ]
57 },
58 "config": {
59 "preferred-install": "dist"
60 }
61 }
This diff could not be displayed because it is too large.
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Application Environment
8 |--------------------------------------------------------------------------
9 |
10 | This value determines the "environment" your application is currently
11 | running in. This may determine how you prefer to configure various
12 | services your application utilizes. Set this in your ".env" file.
13 |
14 */
15
16 'env' => env('APP_ENV', 'production'),
17
18 /*
19 |--------------------------------------------------------------------------
20 | Application Debug Mode
21 |--------------------------------------------------------------------------
22 |
23 | When your application is in debug mode, detailed error messages with
24 | stack traces will be shown on every error that occurs within your
25 | application. If disabled, a simple generic error page is shown.
26 |
27 */
28
29 'debug' => env('APP_DEBUG', false),
30
31 /*
32 |--------------------------------------------------------------------------
33 | Application URL
34 |--------------------------------------------------------------------------
35 |
36 | This URL is used by the console to properly generate URLs when using
37 | the Artisan command line tool. You should set this to the root of
38 | your application so that it is used when running Artisan tasks.
39 |
40 */
41
42 'url' => env('APP_URL', 'http://localhost'),
43
44 /*
45 |--------------------------------------------------------------------------
46 | Application Timezone
47 |--------------------------------------------------------------------------
48 |
49 | Here you may specify the default timezone for your application, which
50 | will be used by the PHP date and date-time functions. We have gone
51 | ahead and set this to a sensible default for you out of the box.
52 |
53 */
54
55 'timezone' => 'UTC',
56
57 /*
58 |--------------------------------------------------------------------------
59 | Application Locale Configuration
60 |--------------------------------------------------------------------------
61 |
62 | The application locale determines the default locale that will be used
63 | by the translation service provider. You are free to set this value
64 | to any of the locales which will be supported by the application.
65 |
66 */
67
68 'locale' => 'en',
69
70 /*
71 |--------------------------------------------------------------------------
72 | Application Fallback Locale
73 |--------------------------------------------------------------------------
74 |
75 | The fallback locale determines the locale to use when the current one
76 | is not available. You may change the value to correspond to any of
77 | the language folders that are provided through your application.
78 |
79 */
80
81 'fallback_locale' => 'en',
82
83 /*
84 |--------------------------------------------------------------------------
85 | Encryption Key
86 |--------------------------------------------------------------------------
87 |
88 | This key is used by the Illuminate encrypter service and should be set
89 | to a random, 32 character string, otherwise these encrypted strings
90 | will not be safe. Please do this before deploying an application!
91 |
92 */
93
94 'key' => env('APP_KEY'),
95
96 'cipher' => 'AES-256-CBC',
97
98 /*
99 |--------------------------------------------------------------------------
100 | Logging Configuration
101 |--------------------------------------------------------------------------
102 |
103 | Here you may configure the log settings for your application. Out of
104 | the box, Laravel uses the Monolog PHP logging library. This gives
105 | you a variety of powerful log handlers / formatters to utilize.
106 |
107 | Available Settings: "single", "daily", "syslog", "errorlog"
108 |
109 */
110
111 'log' => env('APP_LOG', 'single'),
112
113 /*
114 |--------------------------------------------------------------------------
115 | Autoloaded Service Providers
116 |--------------------------------------------------------------------------
117 |
118 | The service providers listed here will be automatically loaded on the
119 | request to your application. Feel free to add your own services to
120 | this array to grant expanded functionality to your applications.
121 |
122 */
123
124 'providers' => [
125
126 /*
127 * Laravel Framework Service Providers...
128 */
129 Illuminate\Auth\AuthServiceProvider::class,
130 Illuminate\Broadcasting\BroadcastServiceProvider::class,
131 Illuminate\Bus\BusServiceProvider::class,
132 Illuminate\Cache\CacheServiceProvider::class,
133 Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
134 Illuminate\Cookie\CookieServiceProvider::class,
135 Illuminate\Database\DatabaseServiceProvider::class,
136 Illuminate\Encryption\EncryptionServiceProvider::class,
137 Illuminate\Filesystem\FilesystemServiceProvider::class,
138 Illuminate\Foundation\Providers\FoundationServiceProvider::class,
139 Illuminate\Hashing\HashServiceProvider::class,
140 Illuminate\Mail\MailServiceProvider::class,
141 Illuminate\Pagination\PaginationServiceProvider::class,
142 Illuminate\Pipeline\PipelineServiceProvider::class,
143 Illuminate\Queue\QueueServiceProvider::class,
144 Illuminate\Redis\RedisServiceProvider::class,
145 Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
146 Illuminate\Session\SessionServiceProvider::class,
147 Illuminate\Translation\TranslationServiceProvider::class,
148 Illuminate\Validation\ValidationServiceProvider::class,
149 Illuminate\View\ViewServiceProvider::class,
150 Vsmoraes\Pdf\PdfServiceProvider::class,
151
152 /*
153 * Application Service Providers...
154 */
155 App\Providers\AppServiceProvider::class,
156 App\Providers\AuthServiceProvider::class,
157 App\Providers\EventServiceProvider::class,
158 App\Providers\RouteServiceProvider::class,
159
160 ],
161
162 /*
163 |--------------------------------------------------------------------------
164 | Class Aliases
165 |--------------------------------------------------------------------------
166 |
167 | This array of class aliases will be registered when this application
168 | is started. However, feel free to register as many as you wish as
169 | the aliases are "lazy" loaded so they don't hinder performance.
170 |
171 */
172
173 'aliases' => [
174
175 'App' => Illuminate\Support\Facades\App::class,
176 'Artisan' => Illuminate\Support\Facades\Artisan::class,
177 'Auth' => Illuminate\Support\Facades\Auth::class,
178 'Blade' => Illuminate\Support\Facades\Blade::class,
179 'Cache' => Illuminate\Support\Facades\Cache::class,
180 'Config' => Illuminate\Support\Facades\Config::class,
181 'Cookie' => Illuminate\Support\Facades\Cookie::class,
182 'Crypt' => Illuminate\Support\Facades\Crypt::class,
183 'DB' => Illuminate\Support\Facades\DB::class,
184 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
185 'Event' => Illuminate\Support\Facades\Event::class,
186 'File' => Illuminate\Support\Facades\File::class,
187 'Gate' => Illuminate\Support\Facades\Gate::class,
188 'Hash' => Illuminate\Support\Facades\Hash::class,
189 'Lang' => Illuminate\Support\Facades\Lang::class,
190 'Log' => Illuminate\Support\Facades\Log::class,
191 'Mail' => Illuminate\Support\Facades\Mail::class,
192 'Password' => Illuminate\Support\Facades\Password::class,
193 'Queue' => Illuminate\Support\Facades\Queue::class,
194 'Redirect' => Illuminate\Support\Facades\Redirect::class,
195 'Redis' => Illuminate\Support\Facades\Redis::class,
196 'Request' => Illuminate\Support\Facades\Request::class,
197 'Response' => Illuminate\Support\Facades\Response::class,
198 'Route' => Illuminate\Support\Facades\Route::class,
199 'Schema' => Illuminate\Support\Facades\Schema::class,
200 'Session' => Illuminate\Support\Facades\Session::class,
201 'Storage' => Illuminate\Support\Facades\Storage::class,
202 'URL' => Illuminate\Support\Facades\URL::class,
203 'Validator' => Illuminate\Support\Facades\Validator::class,
204 'View' => Illuminate\Support\Facades\View::class,
205 'PDF' => Vsmoraes\Pdf\PdfFacade::class
206
207
208 ],
209
210 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Authentication Defaults
8 |--------------------------------------------------------------------------
9 |
10 | This option controls the default authentication "guard" and password
11 | reset options for your application. You may change these defaults
12 | as required, but they're a perfect start for most applications.
13 |
14 */
15
16 'defaults' => [
17 'guard' => 'web',
18 'passwords' => 'users',
19 ],
20
21 /*
22 |--------------------------------------------------------------------------
23 | Authentication Guards
24 |--------------------------------------------------------------------------
25 |
26 | Next, you may define every authentication guard for your application.
27 | Of course, a great default configuration has been defined for you
28 | here which uses session storage and the Eloquent user provider.
29 |
30 | All authentication drivers have a user provider. This defines how the
31 | users are actually retrieved out of your database or other storage
32 | mechanisms used by this application to persist your user's data.
33 |
34 | Supported: "session", "token"
35 |
36 */
37
38 'guards' => [
39 'web' => [
40 'driver' => 'session',
41 'provider' => 'users',
42 ],
43
44 'api' => [
45 'driver' => 'token',
46 'provider' => 'users',
47 ],
48 ],
49
50 /*
51 |--------------------------------------------------------------------------
52 | User Providers
53 |--------------------------------------------------------------------------
54 |
55 | All authentication drivers have a user provider. This defines how the
56 | users are actually retrieved out of your database or other storage
57 | mechanisms used by this application to persist your user's data.
58 |
59 | If you have multiple user tables or models you may configure multiple
60 | sources which represent each model / table. These sources may then
61 | be assigned to any extra authentication guards you have defined.
62 |
63 | Supported: "database", "eloquent"
64 |
65 */
66
67 'providers' => [
68 'users' => [
69 'driver' => 'eloquent',
70 'model' => App\User::class,
71 ],
72
73 // 'users' => [
74 // 'driver' => 'database',
75 // 'table' => 'users',
76 // ],
77 ],
78
79 /*
80 |--------------------------------------------------------------------------
81 | Resetting Passwords
82 |--------------------------------------------------------------------------
83 |
84 | Here you may set the options for resetting passwords including the view
85 | that is your password reset e-mail. You may also set the name of the
86 | table that maintains all of the reset tokens for your application.
87 |
88 | You may specify multiple password reset configurations if you have more
89 | than one user table or model in the application and you want to have
90 | separate password reset settings based on the specific user types.
91 |
92 | The expire time is the number of minutes that the reset token should be
93 | considered valid. This security feature keeps tokens short-lived so
94 | they have less time to be guessed. You may change this as needed.
95 |
96 */
97
98 'passwords' => [
99 'users' => [
100 'provider' => 'users',
101 'email' => 'auth.emails.password',
102 'table' => 'password_resets',
103 'expire' => 60,
104 ],
105 ],
106
107 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Default Broadcaster
8 |--------------------------------------------------------------------------
9 |
10 | This option controls the default broadcaster that will be used by the
11 | framework when an event needs to be broadcast. You may set this to
12 | any of the connections defined in the "connections" array below.
13 |
14 */
15
16 'default' => env('BROADCAST_DRIVER', 'pusher'),
17
18 /*
19 |--------------------------------------------------------------------------
20 | Broadcast Connections
21 |--------------------------------------------------------------------------
22 |
23 | Here you may define all of the broadcast connections that will be used
24 | to broadcast events to other systems or over websockets. Samples of
25 | each available type of connection are provided inside this array.
26 |
27 */
28
29 'connections' => [
30
31 'pusher' => [
32 'driver' => 'pusher',
33 'key' => env('PUSHER_KEY'),
34 'secret' => env('PUSHER_SECRET'),
35 'app_id' => env('PUSHER_APP_ID'),
36 'options' => [
37 //
38 ],
39 ],
40
41 'redis' => [
42 'driver' => 'redis',
43 'connection' => 'default',
44 ],
45
46 'log' => [
47 'driver' => 'log',
48 ],
49
50 ],
51
52 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Default Cache Store
8 |--------------------------------------------------------------------------
9 |
10 | This option controls the default cache connection that gets used while
11 | using this caching library. This connection is used when another is
12 | not explicitly specified when executing a given caching function.
13 |
14 */
15
16 'default' => env('CACHE_DRIVER', 'file'),
17
18 /*
19 |--------------------------------------------------------------------------
20 | Cache Stores
21 |--------------------------------------------------------------------------
22 |
23 | Here you may define all of the cache "stores" for your application as
24 | well as their drivers. You may even define multiple stores for the
25 | same cache driver to group types of items stored in your caches.
26 |
27 */
28
29 'stores' => [
30
31 'apc' => [
32 'driver' => 'apc',
33 ],
34
35 'array' => [
36 'driver' => 'array',
37 ],
38
39 'database' => [
40 'driver' => 'database',
41 'table' => 'cache',
42 'connection' => null,
43 ],
44
45 'file' => [
46 'driver' => 'file',
47 'path' => storage_path('framework/cache'),
48 ],
49
50 'memcached' => [
51 'driver' => 'memcached',
52 'servers' => [
53 [
54 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
55 'port' => env('MEMCACHED_PORT', 11211),
56 'weight' => 100,
57 ],
58 ],
59 ],
60
61 'redis' => [
62 'driver' => 'redis',
63 'connection' => 'default',
64 ],
65
66 ],
67
68 /*
69 |--------------------------------------------------------------------------
70 | Cache Key Prefix
71 |--------------------------------------------------------------------------
72 |
73 | When utilizing a RAM based store such as APC or Memcached, there might
74 | be other applications utilizing the same cache. So, we'll specify a
75 | value to get prefixed to all our keys so we can avoid collisions.
76 |
77 */
78
79 'prefix' => 'laravel',
80
81 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Additional Compiled Classes
8 |--------------------------------------------------------------------------
9 |
10 | Here you may specify additional classes to include in the compiled file
11 | generated by the `artisan optimize` command. These should be classes
12 | that are included on basically every request into the application.
13 |
14 */
15
16 'files' => [
17 //
18 ],
19
20 /*
21 |--------------------------------------------------------------------------
22 | Compiled File Providers
23 |--------------------------------------------------------------------------
24 |
25 | Here you may list service providers which define a "compiles" function
26 | that returns additional files that should be compiled, providing an
27 | easy way to get common files from any packages you are utilizing.
28 |
29 */
30
31 'providers' => [
32 //
33 ],
34
35 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | PDO Fetch Style
8 |--------------------------------------------------------------------------
9 |
10 | By default, database results will be returned as instances of the PHP
11 | stdClass object; however, you may desire to retrieve records in an
12 | array format for simplicity. Here you can tweak the fetch style.
13 |
14 */
15
16 'fetch' => PDO::FETCH_CLASS,
17
18 /*
19 |--------------------------------------------------------------------------
20 | Default Database Connection Name
21 |--------------------------------------------------------------------------
22 |
23 | Here you may specify which of the database connections below you wish
24 | to use as your default connection for all database work. Of course
25 | you may use many connections at once using the Database library.
26 |
27 */
28
29 'default' => env('DB_CONNECTION', 'mysql'),
30
31 /*
32 |--------------------------------------------------------------------------
33 | Database Connections
34 |--------------------------------------------------------------------------
35 |
36 | Here are each of the database connections setup for your application.
37 | Of course, examples of configuring each database platform that is
38 | supported by Laravel is shown below to make development simple.
39 |
40 |
41 | All database work in Laravel is done through the PHP PDO facilities
42 | so make sure you have the driver for your particular database of
43 | choice installed on your machine before you begin development.
44 |
45 */
46
47 'connections' => [
48
49 'sqlite' => [
50 'driver' => 'sqlite',
51 'database' => env('DB_DATABASE', database_path('database.sqlite')),
52 'prefix' => '',
53 ],
54
55 'mysql' => [
56 'driver' => 'mysql',
57 'host' => env('DB_HOST', 'localhost'),
58 'port' => env('DB_PORT', '3306'),
59 'database' => env('DB_DATABASE', 'forge'),
60 'username' => env('DB_USERNAME', 'forge'),
61 'password' => env('DB_PASSWORD', ''),
62 'charset' => 'utf8',
63 'collation' => 'utf8_unicode_ci',
64 'prefix' => '',
65 'strict' => false,
66 'engine' => null,
67 ],
68
69 'pgsql' => [
70 'driver' => 'pgsql',
71 'host' => env('DB_HOST', 'localhost'),
72 'port' => env('DB_PORT', '5432'),
73 'database' => env('DB_DATABASE', 'forge'),
74 'username' => env('DB_USERNAME', 'forge'),
75 'password' => env('DB_PASSWORD', ''),
76 'charset' => 'utf8',
77 'prefix' => '',
78 'schema' => 'public',
79 ],
80
81 ],
82
83 /*
84 |--------------------------------------------------------------------------
85 | Migration Repository Table
86 |--------------------------------------------------------------------------
87 |
88 | This table keeps track of all the migrations that have already run for
89 | your application. Using this information, we can determine which of
90 | the migrations on disk haven't actually been run in the database.
91 |
92 */
93
94 'migrations' => 'migrations',
95
96 /*
97 |--------------------------------------------------------------------------
98 | Redis Databases
99 |--------------------------------------------------------------------------
100 |
101 | Redis is an open source, fast, and advanced key-value store that also
102 | provides a richer set of commands than a typical key-value systems
103 | such as APC or Memcached. Laravel makes it easy to dig right in.
104 |
105 */
106
107 'redis' => [
108
109 'cluster' => false,
110
111 'default' => [
112 'host' => env('REDIS_HOST', 'localhost'),
113 'password' => env('REDIS_PASSWORD', null),
114 'port' => env('REDIS_PORT', 6379),
115 'database' => 0,
116 ],
117
118 ],
119
120 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Default Filesystem Disk
8 |--------------------------------------------------------------------------
9 |
10 | Here you may specify the default filesystem disk that should be used
11 | by the framework. A "local" driver, as well as a variety of cloud
12 | based drivers are available for your choosing. Just store away!
13 |
14 | Supported: "local", "ftp", "s3", "rackspace"
15 |
16 */
17
18 'default' => 'local',
19
20 /*
21 |--------------------------------------------------------------------------
22 | Default Cloud Filesystem Disk
23 |--------------------------------------------------------------------------
24 |
25 | Many applications store files both locally and in the cloud. For this
26 | reason, you may specify a default "cloud" driver here. This driver
27 | will be bound as the Cloud disk implementation in the container.
28 |
29 */
30
31 'cloud' => 's3',
32
33 /*
34 |--------------------------------------------------------------------------
35 | Filesystem Disks
36 |--------------------------------------------------------------------------
37 |
38 | Here you may configure as many filesystem "disks" as you wish, and you
39 | may even configure multiple disks of the same driver. Defaults have
40 | been setup for each driver as an example of the required options.
41 |
42 */
43
44 'disks' => [
45
46 'local' => [
47 'driver' => 'local',
48 'root' => storage_path('app/public'),
49 'visibility' => 'public',
50 ],
51
52 'public' => [
53 'driver' => 'local',
54 'root' => storage_path('app/public'),
55 'visibility' => 'public',
56 ],
57
58 's3' => [
59 'driver' => 's3',
60 'key' => 'your-key',
61 'secret' => 'your-secret',
62 'region' => 'your-region',
63 'bucket' => 'your-bucket',
64 ],
65
66 ],
67
68 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Mail Driver
8 |--------------------------------------------------------------------------
9 |
10 | Laravel supports both SMTP and PHP's "mail" function as drivers for the
11 | sending of e-mail. You may specify which one you're using throughout
12 | your application here. By default, Laravel is setup for SMTP mail.
13 |
14 | Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill",
15 | "ses", "sparkpost", "log"
16 |
17 */
18
19 'driver' => env('MAIL_DRIVER', 'smtp'),
20
21 /*
22 |--------------------------------------------------------------------------
23 | SMTP Host Address
24 |--------------------------------------------------------------------------
25 |
26 | Here you may provide the host address of the SMTP server used by your
27 | applications. A default option is provided that is compatible with
28 | the Mailgun mail service which will provide reliable deliveries.
29 |
30 */
31
32 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
33
34 /*
35 |--------------------------------------------------------------------------
36 | SMTP Host Port
37 |--------------------------------------------------------------------------
38 |
39 | This is the SMTP port used by your application to deliver e-mails to
40 | users of the application. Like the host we have set this value to
41 | stay compatible with the Mailgun e-mail application by default.
42 |
43 */
44
45 'port' => env('MAIL_PORT', 587),
46
47 /*
48 |--------------------------------------------------------------------------
49 | Global "From" Address
50 |--------------------------------------------------------------------------
51 |
52 | You may wish for all e-mails sent by your application to be sent from
53 | the same address. Here, you may specify a name and address that is
54 | used globally for all e-mails that are sent by your application.
55 |
56 */
57
58 'from' => ['address' => null, 'name' => null],
59
60 /*
61 |--------------------------------------------------------------------------
62 | E-Mail Encryption Protocol
63 |--------------------------------------------------------------------------
64 |
65 | Here you may specify the encryption protocol that should be used when
66 | the application send e-mail messages. A sensible default using the
67 | transport layer security protocol should provide great security.
68 |
69 */
70
71 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
72
73 /*
74 |--------------------------------------------------------------------------
75 | SMTP Server Username
76 |--------------------------------------------------------------------------
77 |
78 | If your SMTP server requires a username for authentication, you should
79 | set it here. This will get used to authenticate with your server on
80 | connection. You may also set the "password" value below this one.
81 |
82 */
83
84 'username' => env('MAIL_USERNAME'),
85
86 /*
87 |--------------------------------------------------------------------------
88 | SMTP Server Password
89 |--------------------------------------------------------------------------
90 |
91 | Here you may set the password required by your SMTP server to send out
92 | messages from your application. This will be given to the server on
93 | connection so that the application will be able to send messages.
94 |
95 */
96
97 'password' => env('MAIL_PASSWORD'),
98
99 /*
100 |--------------------------------------------------------------------------
101 | Sendmail System Path
102 |--------------------------------------------------------------------------
103 |
104 | When using the "sendmail" driver to send e-mails, we will need to know
105 | the path to where Sendmail lives on this server. A default path has
106 | been provided here, which will work well on most of your systems.
107 |
108 */
109
110 'sendmail' => '/usr/sbin/sendmail -bs',
111
112 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Default Queue Driver
8 |--------------------------------------------------------------------------
9 |
10 | The Laravel queue API supports a variety of back-ends via an unified
11 | API, giving you convenient access to each back-end using the same
12 | syntax for each one. Here you may set the default queue driver.
13 |
14 | Supported: "null", "sync", "database", "beanstalkd", "sqs", "redis"
15 |
16 */
17
18 'default' => env('QUEUE_DRIVER', 'sync'),
19
20 /*
21 |--------------------------------------------------------------------------
22 | Queue Connections
23 |--------------------------------------------------------------------------
24 |
25 | Here you may configure the connection information for each server that
26 | is used by your application. A default configuration has been added
27 | for each back-end shipped with Laravel. You are free to add more.
28 |
29 */
30
31 'connections' => [
32
33 'sync' => [
34 'driver' => 'sync',
35 ],
36
37 'database' => [
38 'driver' => 'database',
39 'table' => 'jobs',
40 'queue' => 'default',
41 'expire' => 60,
42 ],
43
44 'beanstalkd' => [
45 'driver' => 'beanstalkd',
46 'host' => 'localhost',
47 'queue' => 'default',
48 'ttr' => 60,
49 ],
50
51 'sqs' => [
52 'driver' => 'sqs',
53 'key' => 'your-public-key',
54 'secret' => 'your-secret-key',
55 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
56 'queue' => 'your-queue-name',
57 'region' => 'us-east-1',
58 ],
59
60 'redis' => [
61 'driver' => 'redis',
62 'connection' => 'default',
63 'queue' => 'default',
64 'expire' => 60,
65 ],
66
67 ],
68
69 /*
70 |--------------------------------------------------------------------------
71 | Failed Queue Jobs
72 |--------------------------------------------------------------------------
73 |
74 | These options configure the behavior of failed queue job logging so you
75 | can control which database and table are used to store the jobs that
76 | have failed. You may change them to any database / table you wish.
77 |
78 */
79
80 'failed' => [
81 'database' => env('DB_CONNECTION', 'mysql'),
82 'table' => 'failed_jobs',
83 ],
84
85 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Third Party Services
8 |--------------------------------------------------------------------------
9 |
10 | This file is for storing the credentials for third party services such
11 | as Stripe, Mailgun, Mandrill, and others. This file provides a sane
12 | default location for this type of information, allowing packages
13 | to have a conventional place to find your various credentials.
14 |
15 */
16
17 'mailgun' => [
18 'domain' => env('MAILGUN_DOMAIN'),
19 'secret' => env('MAILGUN_SECRET'),
20 ],
21
22 'ses' => [
23 'key' => env('SES_KEY'),
24 'secret' => env('SES_SECRET'),
25 'region' => 'us-east-1',
26 ],
27
28 'sparkpost' => [
29 'secret' => env('SPARKPOST_SECRET'),
30 ],
31
32 'stripe' => [
33 'model' => App\User::class,
34 'key' => env('STRIPE_KEY'),
35 'secret' => env('STRIPE_SECRET'),
36 ],
37
38 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Default Session Driver
8 |--------------------------------------------------------------------------
9 |
10 | This option controls the default session "driver" that will be used on
11 | requests. By default, we will use the lightweight native driver but
12 | you may specify any of the other wonderful drivers provided here.
13 |
14 | Supported: "file", "cookie", "database", "apc",
15 | "memcached", "redis", "array"
16 |
17 */
18
19 'driver' => env('SESSION_DRIVER', 'file'),
20
21 /*
22 |--------------------------------------------------------------------------
23 | Session Lifetime
24 |--------------------------------------------------------------------------
25 |
26 | Here you may specify the number of minutes that you wish the session
27 | to be allowed to remain idle before it expires. If you want them
28 | to immediately expire on the browser closing, set that option.
29 |
30 */
31
32 'lifetime' => 120,
33
34 'expire_on_close' => false,
35
36 /*
37 |--------------------------------------------------------------------------
38 | Session Encryption
39 |--------------------------------------------------------------------------
40 |
41 | This option allows you to easily specify that all of your session data
42 | should be encrypted before it is stored. All encryption will be run
43 | automatically by Laravel and you can use the Session like normal.
44 |
45 */
46
47 'encrypt' => false,
48
49 /*
50 |--------------------------------------------------------------------------
51 | Session File Location
52 |--------------------------------------------------------------------------
53 |
54 | When using the native session driver, we need a location where session
55 | files may be stored. A default has been set for you but a different
56 | location may be specified. This is only needed for file sessions.
57 |
58 */
59
60 'files' => storage_path('framework/sessions'),
61
62 /*
63 |--------------------------------------------------------------------------
64 | Session Database Connection
65 |--------------------------------------------------------------------------
66 |
67 | When using the "database" or "redis" session drivers, you may specify a
68 | connection that should be used to manage these sessions. This should
69 | correspond to a connection in your database configuration options.
70 |
71 */
72
73 'connection' => null,
74
75 /*
76 |--------------------------------------------------------------------------
77 | Session Database Table
78 |--------------------------------------------------------------------------
79 |
80 | When using the "database" session driver, you may specify the table we
81 | should use to manage the sessions. Of course, a sensible default is
82 | provided for you; however, you are free to change this as needed.
83 |
84 */
85
86 'table' => 'sessions',
87
88 /*
89 |--------------------------------------------------------------------------
90 | Session Sweeping Lottery
91 |--------------------------------------------------------------------------
92 |
93 | Some session drivers must manually sweep their storage location to get
94 | rid of old sessions from storage. Here are the chances that it will
95 | happen on a given request. By default, the odds are 2 out of 100.
96 |
97 */
98
99 'lottery' => [2, 100],
100
101 /*
102 |--------------------------------------------------------------------------
103 | Session Cookie Name
104 |--------------------------------------------------------------------------
105 |
106 | Here you may change the name of the cookie used to identify a session
107 | instance by ID. The name specified here will get used every time a
108 | new session cookie is created by the framework for every driver.
109 |
110 */
111
112 'cookie' => 'laravel_session',
113
114 /*
115 |--------------------------------------------------------------------------
116 | Session Cookie Path
117 |--------------------------------------------------------------------------
118 |
119 | The session cookie path determines the path for which the cookie will
120 | be regarded as available. Typically, this will be the root path of
121 | your application but you are free to change this when necessary.
122 |
123 */
124
125 'path' => '/',
126
127 /*
128 |--------------------------------------------------------------------------
129 | Session Cookie Domain
130 |--------------------------------------------------------------------------
131 |
132 | Here you may change the domain of the cookie used to identify a session
133 | in your application. This will determine which domains the cookie is
134 | available to in your application. A sensible default has been set.
135 |
136 */
137
138 'domain' => null,
139
140 /*
141 |--------------------------------------------------------------------------
142 | HTTPS Only Cookies
143 |--------------------------------------------------------------------------
144 |
145 | By setting this option to true, session cookies will only be sent back
146 | to the server if the browser has a HTTPS connection. This will keep
147 | the cookie from being sent to you if it can not be done securely.
148 |
149 */
150
151 'secure' => false,
152
153 /*
154 |--------------------------------------------------------------------------
155 | HTTP Access Only
156 |--------------------------------------------------------------------------
157 |
158 | Setting this value to true will prevent JavaScript from accessing the
159 | value of the cookie and the cookie will only be accessible through
160 | the HTTP protocol. You are free to modify this option if needed.
161 |
162 */
163
164 'http_only' => true,
165
166 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | View Storage Paths
8 |--------------------------------------------------------------------------
9 |
10 | Most templating systems load templates from disk. Here you may specify
11 | an array of paths that should be checked for your views. Of course
12 | the usual Laravel view path has already been registered for you.
13 |
14 */
15
16 'paths' => [
17 realpath(base_path('resources/views')),
18 ],
19
20 /*
21 |--------------------------------------------------------------------------
22 | Compiled View Path
23 |--------------------------------------------------------------------------
24 |
25 | This option determines where all the compiled Blade templates will be
26 | stored for your application. Typically, this is within the storage
27 | directory. However, as usual, you are free to change this value.
28 |
29 */
30
31 'compiled' => realpath(storage_path('framework/views')),
32
33 ];
1 <?php
2
3 /*
4 |--------------------------------------------------------------------------
5 | Model Factories
6 |--------------------------------------------------------------------------
7 |
8 | Here you may define all of your model factories. Model factories give
9 | you a convenient way to create models for testing and seeding your
10 | database. Just tell the factory how a default model should look.
11 |
12 */
13
14 $factory->define(App\User::class, function (Faker\Generator $faker) {
15 return [
16 'name' => $faker->name,
17 'email' => $faker->safeEmail,
18 'password' => bcrypt(str_random(10)),
19 'remember_token' => str_random(10),
20 ];
21 });
1 <?php
2
3 use Illuminate\Database\Schema\Blueprint;
4 use Illuminate\Database\Migrations\Migration;
5
6 class CreateUsersTable extends Migration
7 {
8 /**
9 * Run the migrations.
10 *
11 * @return void
12 */
13 public function up()
14 {
15 Schema::create('users', function (Blueprint $table) {
16 $table->increments('id');
17 $table->string('name');
18 $table->string('email')->unique();
19 $table->string('password');
20 $table->rememberToken();
21 $table->timestamps();
22 });
23 }
24
25 /**
26 * Reverse the migrations.
27 *
28 * @return void
29 */
30 public function down()
31 {
32 Schema::drop('users');
33 }
34 }
1 <?php
2
3 use Illuminate\Database\Schema\Blueprint;
4 use Illuminate\Database\Migrations\Migration;
5
6 class CreatePasswordResetsTable extends Migration
7 {
8 /**
9 * Run the migrations.
10 *
11 * @return void
12 */
13 public function up()
14 {
15 Schema::create('password_resets', function (Blueprint $table) {
16 $table->string('email')->index();
17 $table->string('token')->index();
18 $table->timestamp('created_at');
19 });
20 }
21
22 /**
23 * Reverse the migrations.
24 *
25 * @return void
26 */
27 public function down()
28 {
29 Schema::drop('password_resets');
30 }
31 }
1 <?php
2
3 use Illuminate\Database\Seeder;
4
5 class DatabaseSeeder extends Seeder
6 {
7 /**
8 * Run the database seeds.
9 *
10 * @return void
11 */
12 public function run()
13 {
14 // $this->call(UsersTableSeeder::class);
15 }
16 }
1 var elixir = require('laravel-elixir');
2
3 /*
4 |--------------------------------------------------------------------------
5 | Elixir Asset Management
6 |--------------------------------------------------------------------------
7 |
8 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
9 | for your Laravel application. By default, we are compiling the Sass
10 | file for our application, as well as publishing vendor resources.
11 |
12 */
13
14 elixir(function(mix) {
15 mix.sass('app.scss');
16 });
1 {
2 "private": true,
3 "devDependencies": {
4 "gulp": "^3.9.1"
5 },
6 "dependencies": {
7 "laravel-elixir": "^5.0.0",
8 "bootstrap-sass": "^3.0.0"
9 }
10 }
1 <?xml version="1.0" encoding="UTF-8"?>
2 <phpunit backupGlobals="false"
3 backupStaticAttributes="false"
4 bootstrap="bootstrap/autoload.php"
5 colors="true"
6 convertErrorsToExceptions="true"
7 convertNoticesToExceptions="true"
8 convertWarningsToExceptions="true"
9 processIsolation="false"
10 stopOnFailure="false">
11 <testsuites>
12 <testsuite name="Application Test Suite">
13 <directory suffix="Test.php">./tests</directory>
14 </testsuite>
15 </testsuites>
16 <filter>
17 <whitelist processUncoveredFilesFromWhitelist="true">
18 <directory suffix=".php">./app</directory>
19 <exclude>
20 <file>./app/Http/routes.php</file>
21 </exclude>
22 </whitelist>
23 </filter>
24 <php>
25 <env name="APP_ENV" value="testing"/>
26 <env name="CACHE_DRIVER" value="array"/>
27 <env name="SESSION_DRIVER" value="array"/>
28 <env name="QUEUE_DRIVER" value="sync"/>
29 </php>
30 </phpunit>
1 <IfModule mod_rewrite.c>
2 <IfModule mod_negotiation.c>
3 Options -MultiViews
4 </IfModule>
5
6 RewriteEngine On
7
8 # Redirect Trailing Slashes If Not A Folder...
9 RewriteCond %{REQUEST_FILENAME} !-d
10 RewriteRule ^(.*)/$ /$1 [L,R=301]
11
12 # Handle Front Controller...
13 RewriteCond %{REQUEST_FILENAME} !-d
14 RewriteCond %{REQUEST_FILENAME} !-f
15 RewriteRule ^ index.php [L]
16
17 # Handle Authorization Header
18 RewriteCond %{HTTP:Authorization} .
19 RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
20 </IfModule>
File mode changed
1 <?php
2
3 /**
4 * Laravel - A PHP Framework For Web Artisans
5 *
6 * @package Laravel
7 * @author Taylor Otwell <taylorotwell@gmail.com>
8 */
9
10 /*
11 |--------------------------------------------------------------------------
12 | Register The Auto Loader
13 |--------------------------------------------------------------------------
14 |
15 | Composer provides a convenient, automatically generated class loader for
16 | our application. We just need to utilize it! We'll simply require it
17 | into the script here so that we don't have to worry about manual
18 | loading any of our classes later on. It feels nice to relax.
19 |
20 */
21
22 require __DIR__.'/../bootstrap/autoload.php';
23
24 /*
25 |--------------------------------------------------------------------------
26 | Turn On The Lights
27 |--------------------------------------------------------------------------
28 |
29 | We need to illuminate PHP development, so let us turn on the lights.
30 | This bootstraps the framework and gets it ready for use, then it
31 | will load up this application so that we can run it and send
32 | the responses back to the browser and delight our users.
33 |
34 */
35
36 $app = require_once __DIR__.'/../bootstrap/app.php';
37
38 /*
39 |--------------------------------------------------------------------------
40 | Run The Application
41 |--------------------------------------------------------------------------
42 |
43 | Once we have the application, we can handle the incoming request
44 | through the kernel, and send the associated response back to
45 | the client's browser allowing them to enjoy the creative
46 | and wonderful application we have prepared for them.
47 |
48 */
49
50 $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
51
52 $response = $kernel->handle(
53 $request = Illuminate\Http\Request::capture()
54 );
55
56 $response->send();
57
58 $kernel->terminate($request, $response);
1 User-agent: *
2 Disallow:
1 <configuration>
2 <system.webServer>
3 <rewrite>
4 <rules>
5 <rule name="Imported Rule 1" stopProcessing="true">
6 <match url="^(.*)/$" ignoreCase="false" />
7 <conditions>
8 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
9 </conditions>
10 <action type="Redirect" redirectType="Permanent" url="/{R:1}" />
11 </rule>
12 <rule name="Imported Rule 2" stopProcessing="true">
13 <match url="^" ignoreCase="false" />
14 <conditions>
15 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
16 <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
17 </conditions>
18 <action type="Rewrite" url="index.php" />
19 </rule>
20 </rules>
21 </rewrite>
22 </system.webServer>
23 </configuration>
1 # Laravel PHP Framework
2
3 [![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework)
4 [![Total Downloads](https://poser.pugx.org/laravel/framework/d/total.svg)](https://packagist.org/packages/laravel/framework)
5 [![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework)
6 [![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework)
7 [![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework)
8
9 Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching.
10
11 Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.
12
13 ## Official Documentation
14
15 Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs).
16
17 ## Contributing
18
19 Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions).
20
21 ## Security Vulnerabilities
22
23 If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.
24
25 ## License
26
27 The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
1 // @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
2
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Authentication Language Lines
8 |--------------------------------------------------------------------------
9 |
10 | The following language lines are used during authentication for various
11 | messages that we need to display to the user. You are free to modify
12 | these language lines according to your application's requirements.
13 |
14 */
15
16 'failed' => 'These credentials do not match our records.',
17 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18
19 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Pagination Language Lines
8 |--------------------------------------------------------------------------
9 |
10 | The following language lines are used by the paginator library to build
11 | the simple pagination links. You are free to change them to anything
12 | you want to customize your views to better match your application.
13 |
14 */
15
16 'previous' => '&laquo; Previous',
17 'next' => 'Next &raquo;',
18
19 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Password Reset Language Lines
8 |--------------------------------------------------------------------------
9 |
10 | The following language lines are the default lines which match reasons
11 | that are given by the password broker for a password update attempt
12 | has failed, such as for an invalid token or invalid new password.
13 |
14 */
15
16 'password' => 'Passwords must be at least six characters and match the confirmation.',
17 'reset' => 'Your password has been reset!',
18 'sent' => 'We have e-mailed your password reset link!',
19 'token' => 'This password reset token is invalid.',
20 'user' => "We can't find a user with that e-mail address.",
21
22 ];
1 <?php
2
3 return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | Validation Language Lines
8 |--------------------------------------------------------------------------
9 |
10 | The following language lines contain the default error messages used by
11 | the validator class. Some of these rules have multiple versions such
12 | as the size rules. Feel free to tweak each of these messages here.
13 |
14 */
15
16 'accepted' => 'The :attribute must be accepted.',
17 'active_url' => 'The :attribute is not a valid URL.',
18 'after' => 'The :attribute must be a date after :date.',
19 'alpha' => 'The :attribute may only contain letters.',
20 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
21 'alpha_num' => 'The :attribute may only contain letters and numbers.',
22 'array' => 'The :attribute must be an array.',
23 'before' => 'The :attribute must be a date before :date.',
24 'between' => [
25 'numeric' => 'The :attribute must be between :min and :max.',
26 'file' => 'The :attribute must be between :min and :max kilobytes.',
27 'string' => 'The :attribute must be between :min and :max characters.',
28 'array' => 'The :attribute must have between :min and :max items.',
29 ],
30 'boolean' => 'The :attribute field must be true or false.',
31 'confirmed' => 'The :attribute confirmation does not match.',
32 'date' => 'The :attribute is not a valid date.',
33 'date_format' => 'The :attribute does not match the format :format.',
34 'different' => 'The :attribute and :other must be different.',
35 'digits' => 'The :attribute must be :digits digits.',
36 'digits_between' => 'The :attribute must be between :min and :max digits.',
37 'distinct' => 'The :attribute field has a duplicate value.',
38 'email' => 'The :attribute must be a valid email address.',
39 'exists' => 'The selected :attribute is invalid.',
40 'filled' => 'The :attribute field is required.',
41 'image' => 'The :attribute must be an image.',
42 'in' => 'The selected :attribute is invalid.',
43 'in_array' => 'The :attribute field does not exist in :other.',
44 'integer' => 'The :attribute must be an integer.',
45 'ip' => 'The :attribute must be a valid IP address.',
46 'json' => 'The :attribute must be a valid JSON string.',
47 'max' => [
48 'numeric' => 'The :attribute may not be greater than :max.',
49 'file' => 'The :attribute may not be greater than :max kilobytes.',
50 'string' => 'The :attribute may not be greater than :max characters.',
51 'array' => 'The :attribute may not have more than :max items.',
52 ],
53 'mimes' => 'The :attribute must be a file of type: :values.',
54 'min' => [
55 'numeric' => 'The :attribute must be at least :min.',
56 'file' => 'The :attribute must be at least :min kilobytes.',
57 'string' => 'The :attribute must be at least :min characters.',
58 'array' => 'The :attribute must have at least :min items.',
59 ],
60 'not_in' => 'The selected :attribute is invalid.',
61 'numeric' => 'The :attribute must be a number.',
62 'present' => 'The :attribute field must be present.',
63 'regex' => 'The :attribute format is invalid.',
64 'required' => 'The :attribute field is required.',
65 'required_if' => 'The :attribute field is required when :other is :value.',
66 'required_unless' => 'The :attribute field is required unless :other is in :values.',
67 'required_with' => 'The :attribute field is required when :values is present.',
68 'required_with_all' => 'The :attribute field is required when :values is present.',
69 'required_without' => 'The :attribute field is required when :values is not present.',
70 'required_without_all' => 'The :attribute field is required when none of :values are present.',
71 'same' => 'The :attribute and :other must match.',
72 'size' => [
73 'numeric' => 'The :attribute must be :size.',
74 'file' => 'The :attribute must be :size kilobytes.',
75 'string' => 'The :attribute must be :size characters.',
76 'array' => 'The :attribute must contain :size items.',
77 ],
78 'string' => 'The :attribute must be a string.',
79 'timezone' => 'The :attribute must be a valid zone.',
80 'unique' => 'The :attribute has already been taken.',
81 'url' => 'The :attribute format is invalid.',
82
83 /*
84 |--------------------------------------------------------------------------
85 | Custom Validation Language Lines
86 |--------------------------------------------------------------------------
87 |
88 | Here you may specify custom validation messages for attributes using the
89 | convention "attribute.rule" to name the lines. This makes it quick to
90 | specify a specific custom language line for a given attribute rule.
91 |
92 */
93
94 'custom' => [
95 'attribute-name' => [
96 'rule-name' => 'custom-message',
97 ],
98 ],
99
100 /*
101 |--------------------------------------------------------------------------
102 | Custom Validation Attributes
103 |--------------------------------------------------------------------------
104 |
105 | The following language lines are used to swap attribute place-holders
106 | with something more reader friendly such as E-Mail Address instead
107 | of "email". This simply helps us make messages a little cleaner.
108 |
109 */
110
111 'attributes' => [],
112
113 ];
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Laravel</title>
5
6 <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
7
8 <style>
9 html, body {
10 height: 100%;
11 }
12
13 body {
14 margin: 0;
15 padding: 0;
16 width: 100%;
17 display: table;
18 font-weight: 100;
19 font-family: 'Lato';
20 }
21
22 .container {
23 text-align: center;
24 display: table-cell;
25 vertical-align: middle;
26 }
27
28 .content {
29 text-align: center;
30 display: inline-block;
31 }
32
33 .title {
34 font-size: 96px;
35 }
36 </style>
37 </head>
38 <body>
39 <div class="container">
40 <div class="content">
41 <div class="title">pdf</div>
42 </div>
43 </div>
44 </body>
45 </html>
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Be right back.</title>
5
6 <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
7
8 <style>
9 html, body {
10 height: 100%;
11 }
12
13 body {
14 margin: 0;
15 padding: 0;
16 width: 100%;
17 color: #B0BEC5;
18 display: table;
19 font-weight: 100;
20 font-family: 'Lato';
21 }
22
23 .container {
24 text-align: center;
25 display: table-cell;
26 vertical-align: middle;
27 }
28
29 .content {
30 text-align: center;
31 display: inline-block;
32 }
33
34 .title {
35 font-size: 72px;
36 margin-bottom: 40px;
37 }
38 </style>
39 </head>
40 <body>
41 <div class="container">
42 <div class="content">
43 <div class="title">Be right back.</div>
44 </div>
45 </div>
46 </body>
47 </html>
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Laravel</title>
5
6 <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
7
8 <style>
9 html, body {
10 height: 100%;
11 }
12
13 body {
14 margin: 0;
15 padding: 0;
16 width: 100%;
17 display: table;
18 font-weight: 100;
19 font-family: 'Lato';
20 }
21
22 .container {
23 text-align: center;
24 display: table-cell;
25 vertical-align: middle;
26 }
27
28 .content {
29 text-align: center;
30 display: inline-block;
31 }
32
33 .title {
34 font-size: 96px;
35 }
36 </style>
37 </head>
38 <body>
39 <div class="container">
40 <div class="content">
41 <div class="title">Laravel 5</div>
42 </div>
43 </div>
44 </body>
45 </html>
1 <?php
2
3 /**
4 * Laravel - A PHP Framework For Web Artisans
5 *
6 * @package Laravel
7 * @author Taylor Otwell <taylorotwell@gmail.com>
8 */
9
10 $uri = urldecode(
11 parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
12 );
13
14 // This file allows us to emulate Apache's "mod_rewrite" functionality from the
15 // built-in PHP web server. This provides a convenient way to test a Laravel
16 // application without having installed a "real" web server software here.
17 if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
18 return false;
19 }
20
21 require_once __DIR__.'/public/index.php';
1 *
2 !public/
3 !.gitignore
1 config.php
2 routes.php
3 schedule-*
4 compiled.php
5 services.json
6 events.scanned.php
7 routes.scanned.php
8 down
1 <?php
2
3 use Illuminate\Foundation\Testing\WithoutMiddleware;
4 use Illuminate\Foundation\Testing\DatabaseMigrations;
5 use Illuminate\Foundation\Testing\DatabaseTransactions;
6
7 class ExampleTest extends TestCase
8 {
9 /**
10 * A basic functional test example.
11 *
12 * @return void
13 */
14 public function testBasicExample()
15 {
16 $this->visit('/')
17 ->see('Laravel 5');
18 }
19 }
1 <?php
2
3 class TestCase extends Illuminate\Foundation\Testing\TestCase
4 {
5 /**
6 * The base URL to use while testing the application.
7 *
8 * @var string
9 */
10 protected $baseUrl = 'http://localhost';
11
12 /**
13 * Creates the application.
14 *
15 * @return \Illuminate\Foundation\Application
16 */
17 public function createApplication()
18 {
19 $app = require __DIR__.'/../bootstrap/app.php';
20
21 $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
22
23 return $app;
24 }
25 }