-
Notifications
You must be signed in to change notification settings - Fork 3
/
laravel.commands.txt
389 lines (289 loc) · 10.2 KB
/
laravel.commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
>>>>>>>> Laravel Commands <<<<<<<<<
----------------------------------------------------
----------------------------------------------------
Keys: Namespaces, laravel installation,
upload images,
----------------------------------------------------
----------------------------------------------------
----------------------------------------------------
----------------------------------------------------
3) Installing Laravel:
Type the following command in your command prompt window:
composer global require “laravel/installer”.
composer create-project –prefer-dist laravel/laravel Project_name: this command will install Laravel
and other dependencies with it also generate the ANSI key.
----------------------------------------------------
----------------------------------------------------
Namespaces
Illuminate
Illuminate
Illuminate\Auth
Illuminate\Auth\Access
Illuminate\Auth\Access\Events
Illuminate\Auth\Console
Illuminate\Auth\Events
Illuminate\Auth\Listeners
Illuminate\Auth\Middleware
Illuminate\Auth\Notifications
Illuminate\Auth\Passwords
Illuminate\Broadcasting
Illuminate\Broadcasting\Broadcasters
Illuminate\Bus
Illuminate\Bus\Events
Illuminate\Cache
Illuminate\Cache\Console
Illuminate\Cache\Events
Illuminate\Cache\RateLimiting
Illuminate\Config
Illuminate\Console
Illuminate\Console\Concerns
Illuminate\Console\Events
Illuminate\Console\Scheduling
Illuminate\Container
Illuminate\Contracts
Illuminate\Contracts\Auth
Illuminate\Contracts\Auth\Access
Illuminate\Contracts\Auth\Middleware
Illuminate\Contracts\Broadcasting
Illuminate\Contracts\Bus
Illuminate\Contracts\Cache
Illuminate\Contracts\Config
Illuminate\Contracts\Console
Illuminate\Contracts\Container
Illuminate\Contracts\Cookie
Illuminate\Contracts\Database
Illuminate\Contracts\Database\Eloquent
Illuminate\Contracts\Database\Events
Illuminate\Contracts\Debug
Illuminate\Contracts\Encryption
Illuminate\Contracts\Events
Illuminate\Contracts\Filesystem
Illuminate\Contracts\Foundation
Illuminate\Contracts\Hashing
Illuminate\Contracts\Http
Illuminate\Contracts\Mail
Illuminate\Contracts\Notifications
Illuminate\Contracts\Pagination
Illuminate\Contracts\Pipeline
Illuminate\Contracts\Queue
Illuminate\Contracts\Redis
Illuminate\Contracts\Routing
Illuminate\Contracts\Session
Illuminate\Contracts\Support
Illuminate\Contracts\Translation
Illuminate\Contracts\Validation
Illuminate\Contracts\View
Illuminate\Cookie
Illuminate\Cookie\Middleware
Illuminate\Database
Illuminate\Database\Capsule
Illuminate\Database\Concerns
Illuminate\Database\Connectors
Illuminate\Database\Console
Illuminate\Database\Console\Factories
Illuminate\Database\Console\Migrations
Illuminate\Database\Console\Seeds
Illuminate\Database\DBAL
Illuminate\Database\Eloquent
Illuminate\Database\Eloquent\Casts
Illuminate\Database\Eloquent\Concerns
Illuminate\Database\Eloquent\Factories
Illuminate\Database\Eloquent\Relations
Illuminate\Database\Eloquent\Relations\Concerns
Illuminate\Database\Events
Illuminate\Database\Migrations
Illuminate\Database\PDO
Illuminate\Database\PDO\Concerns
Illuminate\Database\Query
Illuminate\Database\Query\Grammars
Illuminate\Database\Query\Processors
Illuminate\Database\Schema
Illuminate\Database\Schema\Grammars
Illuminate\Encryption
Illuminate\Events
Illuminate\Filesystem
Illuminate\Foundation
Illuminate\Foundation\Auth
Illuminate\Foundation\Auth\Access
Illuminate\Foundation\Bootstrap
Illuminate\Foundation\Bus
Illuminate\Foundation\Console
Illuminate\Foundation\Events
Illuminate\Foundation\Exceptions
Illuminate\Foundation\Http
Illuminate\Foundation\Http\Events
Illuminate\Foundation\Http\Exceptions
Illuminate\Foundation\Http\Middleware
Illuminate\Foundation\Providers
Illuminate\Foundation\Support
Illuminate\Foundation\Support\Providers
Illuminate\Foundation\Testing
Illuminate\Foundation\Testing\Concerns
Illuminate\Foundation\Testing\Traits
Illuminate\Foundation\Validation
Illuminate\Hashing
Illuminate\Http
Illuminate\Http\Client
Illuminate\Http\Client\Events
Illuminate\Http\Concerns
Illuminate\Http\Exceptions
Illuminate\Http\Middleware
Illuminate\Http\Resources
Illuminate\Http\Resources\Json
Illuminate\Http\Testing
Illuminate\Log
Illuminate\Log\Events
Illuminate\Mail
Illuminate\Mail\Events
Illuminate\Mail\Transport
Illuminate\Notifications
Illuminate\Notifications\Channels
Illuminate\Notifications\Console
Illuminate\Notifications\Events
Illuminate\Notifications\Messages
Illuminate\Pagination
Illuminate\Pipeline
Illuminate\Queue
Illuminate\Queue\Capsule
Illuminate\Queue\Connectors
Illuminate\Queue\Console
Illuminate\Queue\Events
Illuminate\Queue\Failed
Illuminate\Queue\Jobs
Illuminate\Queue\Middleware
Illuminate\Redis
Illuminate\Redis\Connections
Illuminate\Redis\Connectors
Illuminate\Redis\Events
Illuminate\Redis\Limiters
Illuminate\Routing
Illuminate\Routing\Console
Illuminate\Routing\Contracts
Illuminate\Routing\Events
Illuminate\Routing\Exceptions
Illuminate\Routing\Matching
Illuminate\Routing\Middleware
Illuminate\Session
Illuminate\Session\Console
Illuminate\Session\Middleware
Illuminate\Support
Illuminate\Support\Facades
Illuminate\Support\Testing
Illuminate\Support\Testing\Fakes
Illuminate\Support\Traits
Illuminate\Testing
Illuminate\Testing\Concerns
Illuminate\Testing\Constraints
Illuminate\Testing\Fluent
Illuminate\Testing\Fluent\Concerns
Illuminate\Translation
Illuminate\Validation
Illuminate\Validation\Concerns
Illuminate\Validation\Rules
Illuminate\View
Illuminate\View\Compilers
Illuminate\View\Compilers\Concerns
Illuminate\View\Concerns
Illuminate\View\Engines
Illuminate\View\Middleware
--------------------------------------------------------
----------------------------------------------------------
----------------------------------------------------------
>>>>>>>>>> Laravel Installation Steps <<<<<<<<<<<<
composer global require laravel/installer
laravel --version
composer global require "laravel/installer:^4.0"
composer global remove laravel/installer
composer global require laravel/installer
laravel new --help
----------
Option 01:
----------
//Install JetStream
laravel new test --jet
npm install
npm run dev
OR
npm install && npm run dev
php artisan migrate
ERROR:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: ...)
use Illuminate\Support\Facades\Schema;public function boot()
{
Schema::defaultStringLength(191);
}
php artisan migrate:fresh
--Steps Complete--
---------
Option 2:
---------
laravel new test2
composer require laravel/jetstream
// LIVEWIRE
// Install JetStream with the Livewire stack without teams
php artisan jetstream:install livewire// Install JetStream with the LiveWire stack and teams
php artisan jetstream:install livewire --teams
// INERTIA
// Install JetStream with the Inertia stack without teams
php artisan jetstream:install inertia// Install Jetstream with the Inertia stack and teams
php artisan jetstream:install inertia --teams
npm install
npm run dev
npm install && npm run dev
php artisan migrate
//If Showing Errors:
use Illuminate\Support\Facades\Schema;public function boot()
{
Schema::defaultStringLength(191);
}
php artisan migrate:fresh
php artisan serve
----Steps Completed-----
----------------------------------------------------------
----------------------------------------------------------
>>>> Upload Images <<<<
public : images (Dir)
Routes : Web.php
Controller : ImageController.php //php artisan make:contoller ImageController
View : image-form.blade.php
//1. Routes: Web.php
Route::get('image', [ImageController::class, 'index'])->name('image.index');
Route::post('image', [ImageController::class, 'store'])->name('image.store');
//2. Controller: ImageController.php
class ImageController extends Controller
{
public function index() {
return view('image-form');
}
public function store(Request $request) {
$request->validate([
'image' => 'required|image|mimes:png,jpg,jpeg|max:2048'
]);
$imageName = time().'.'.$request->image->extension();
// Public Folder
$request->image->move(public_path('images'), $imageName);
return back()->with('success', 'Image uploaded Successfully!')
->with('image', $imageName);
}
}
//3. View: image-form.blade.php
<!-- Container (Contact Section) -->
<div id="contact" class="container">
<h1 class="text-center" style="margin-top: 100px">Image Upload</h1>
@if ($message = Session::get('success'))
<div class="alert alert-success alert-block">
<strong>{{$message}}</strong>
</div>
<img src="{{ asset('images/'.Session::get('image')) }}" />
@endif
<form method="POST" action="{{ route('image.store') }}" enctype="multipart/form-data">
@csrf
<input type="file" class="form-control" name="image" />
<button type="submit" class="btn btn-sm">Upload</button>
</form>
</div>
----------------------------------------------------------
----------------------------------------------------------
----------------------------------------------------------
----------------------------------------------------------
----------------------------------------------------------