Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samk13/laravel-vue-codeinspire
https://github.com/samk13/laravel-vue-codeinspire
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/samk13/laravel-vue-codeinspire
- Owner: Samk13
- Created: 2020-01-03T20:26:41.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-09T14:59:49.000Z (11 months ago)
- Last Synced: 2024-02-09T16:07:48.419Z (11 months ago)
- Language: PHP
- Size: 2.19 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Laravel vue App
# Quick notes
## exemple on how to create a validation for the request in userontroller:
```php
public function store(Request $request)
{
// addng validation to the request
$this->validate($request, [
'name' => 'required|string|max:255',
'email'=>'required|string|email|max:255|unique:users',
'password'=> 'required|string|min:3'
] );
// create a user from the form request
return User::create([
'name' => $request['name'],
'email'=> $request['email'],
'type'=> $request['type'],
'bio'=> $request['bio'],
'photo'=> $request['photo'],
'password'=> Hash::make($request['password'])
]);
}
```## when using vueRouter you should change the route in laravel "web.php" to this
this will fix the problem when you hard reload the page and you get page not found```php
Route::get('/{any}', 'HomeController@index')->where('any', '.*');
```