What is the best data table to create, update, and delete for Laravel?

|
Balci_Baba 2019-01-21 11:15:13
Thank you very much again.
2019-01-21 11:15:41
Who has a complete laravel book with example
Balci_Baba 2019-01-21 11:15:45
Great
Balci_Baba 2019-01-21 11:16:31
2019-01-21 11:15:41
Who has a complete laravel book with example

Exectly

Balci_Baba 2019-01-21 11:17:50
I’m following a video series. From here, I get help from https://laravel.com/docs/5.7.

Laravel – The PHP Framework For Web ArtisansLaravel
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
2019-01-21 11:17:54
I want to learn Laravel from scratch
yoofi_graham 2019-01-21 11:20:00
2019-01-21 11:17:54
I want to learn Laravel from scratch

Checkout laracast

https://laracasts.com/skills/laravel

Balci_Baba 2019-01-21 11:25:00
yoofi_graham 2019-01-21 11:20:00
Checkout laracast

https://laracasts.com/skills/laravel

Thanks for advice.

StanleyMasinde 2019-01-21 11:25:03
laravel_discuss-624.jpg
I think it would be better if we had one group
yoofi_graham 2019-01-21 11:25:58
Balci_Baba 2019-01-21 11:25:00
Thanks for advice.

You’re welcome

Balci_Baba 2019-01-21 11:26:18
Harrisdtt 2019-01-21 11:04:42
dear all, I need admin pannel with laravel, which opensource do you recommand.

Is there an open-source management panel written in Laravel?

Harrisdtt 2019-01-21 11:27:32
Balci_Baba 2019-01-21 11:26:18
Is there an open-source management panel written in Laravel?

i mean like laravel nova (commercial) , voyager (open-source)

Harrisdtt 2019-01-21 11:28:13
but i don’t know which one is suitable, so can someone suggest me
htoowaikhant 2019-01-21 11:29:23
if you familiar with vue js , you can check it out http://laraspace.in/
Balci_Baba 2019-01-21 11:32:22
htoowaikhant 2019-01-21 11:29:23
if you familiar with vue js , you can check it out http://laraspace.in/

Isn’t it possible with pure php?

emmazoubi 2019-01-21 12:57:25
2019-01-21 05:51:30
Did you install Laravel CLI?

No.

emmazoubi 2019-01-21 13:01:12
Kaospolos 2019-01-21 07:24:33
That is solution in problem @zoubinnaba

Thank’s guys it work finaly.

lang_blocker_bot 2019-01-21 13:40:28
Message from ایمان غفوری deleted because language Persian [fa] is not allowed in this chat
emmazoubi 2019-01-21 15:44:33
Guys i need help.
this is my route:<?php

// Route::get(‘/’, function () {
// return view(‘blog.index’)->name(‘blog_path’);
// });

Route::get(‘/’, ‘PostController@index’)->name(‘home’);

Route::get(‘/post/create’, ‘PostController@create’)->name(‘create’);

Route::post(‘/’, ‘PostController@store’)->name(‘blog_store’);

And this is my controller:<?php

namespace AppHttpControllers;

use AppModelpost;
use IlluminateHttpRequest;

class PostController extends Controller
{
/
* Display a listing of the resource.
*
* @return IlluminateHttpResponse
*/
public function index()
{
$post = Post::all();

return view(‘blog.index’, compact(‘post’));
}

/
* Show the form for creating a new resource.
*
* @return IlluminateHttpResponse
*/
public function create()
{

return view(‘blog.create’);
}

/
* Store a newly created resource in storage.
*
* @param IlluminateHttpRequest $request
* @return IlluminateHttpResponse
*/
public function store(Request $request)
{
$post = new Post;
$post->title = $request->title;
$post->body = $request->body;
$post->image = $request->image;
$post->save();
return redirect()->route(‘home’);
}

/
* Display the specified resource.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function show($id)
{
//
}

/
* Show the form for editing the specified resource.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function edit($id)
{
//
}

/
* Update the specified resource in storage.
*
* @param IlluminateHttpRequest $request
* @param int $id
* @return IlluminateHttpResponse
*/
public function update(Request $request, $id)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function destroy($id)
{
//
}
}

I got this error: Symfony Component HttpKernel Exception MethodNotAllowedHttpException
No message

This error come when i try to submit data on database.

yoofi_graham 2019-01-21 15:52:51
are you able to view your blog posts?
emmazoubi 2019-01-21 15:54:27
yoofi_graham 2019-01-21 15:52:51
are you able to view your blog posts?

NO

Hfally 2019-01-21 15:55:12
emmazoubi 2019-01-21 15:44:33
Guys i need help.
this is my route:<?php

// Route::get(‘/’, function () {
// return view(‘blog.index’)->name(‘blog_path’);
// });

Route::get(‘/’, ‘PostController@index’)->name(‘home’);

Route::get(‘/post/create’, ‘PostController@create’)->name(‘create’);

Route::post(‘/’, ‘PostController@store’)->name(‘blog_store’);

And this is my controller:<?php

namespace AppHttpControllers;

use AppModelpost;
use IlluminateHttpRequest;

class PostController extends Controller
{
/
* Display a listing of the resource.
*
* @return IlluminateHttpResponse
*/
public function index()
{
$post = Post::all();

return view(‘blog.index’, compact(‘post’));
}

/
* Show the form for creating a new resource.
*
* @return IlluminateHttpResponse
*/
public function create()
{

return view(‘blog.create’);
}

/
* Store a newly created resource in storage.
*
* @param IlluminateHttpRequest $request
* @return IlluminateHttpResponse
*/
public function store(Request $request)
{
$post = new Post;
$post->title = $request->title;
$post->body = $request->body;
$post->image = $request->image;
$post->save();
return redirect()->route(‘home’);
}

/
* Display the specified resource.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function show($id)
{
//
}

/
* Show the form for editing the specified resource.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function edit($id)
{
//
}

/
* Update the specified resource in storage.
*
* @param IlluminateHttpRequest $request
* @param int $id
* @return IlluminateHttpResponse
*/
public function update(Request $request, $id)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function destroy($id)
{
//
}
}

I got this error: Symfony Component HttpKernel Exception MethodNotAllowedHttpException
No message

This error come when i try to submit data on database.

What route is supposed to handle submit?

Hfally 2019-01-21 15:56:01
And do you have method=’post’ in your form tag?
emmazoubi 2019-01-21 15:56:14
Hfally 2019-01-21 15:55:12
What route is supposed to handle submit?

Yes @store data.

Hfally 2019-01-21 15:57:17
Can you send your form tag with its attribute? @zoubinnaba
emmazoubi 2019-01-21 15:58:20
@extends(‘blog/index’)

@section(‘content’)

<div class=”container”>
<br>
<br>
@csrf
<form action=”{{ route(‘blog_store’) }}” method=”POST”>
<div class=”form-group”>
<label for=”exampleInputEmail1″>Title</label>
<input type=”text” class=”form-control” id=”exampleInputTitle” placeholder=”Enter title”>
</div>
<div class=”form-group”>
<label for=”exampleInputBody”>Body</label>
<textarea class=”form-control” placeholder=”Enter body”>

</textarea>
</div>
<div class=”form-group”>
<label for=”exampleFormControlFile1″>Example file input</label>
<input type=”file” class=”form-control-file” id=”exampleFormControlFile1″>
</div>
<button type=”submit” class=”btn btn-primary”>Submit</button>
</form>
</div>
@endsection

yoofi_graham 2019-01-21 15:59:07
use ” use Apppost; ” instead of “use AppModelpost;” (unless you have a folder named Model in your app folder)
emmazoubi 2019-01-21 16:00:31
yoofi_graham 2019-01-21 15:59:07
use ” use Apppost; ” instead of “use AppModelpost;” (unless you have a folder named Model in your app folder)

Yes i have Model folder in my app folder

yoofi_graham 2019-01-21 16:00:36
i think @csrf should be within the form tag
yoofi_graham 2019-01-21 16:00:42
<form method=”POST” action=”/profile”>
@csrf

</form>
Hfally 2019-01-21 16:02:12
@extends(‘blog/index’)

@section(‘content’)

<div class=”container”>
<br>
<br>
@csrf
<form action=”{{ route(‘blog_store’) }}” method=”post”>
{{ csrf_field() }}
<div class=”form-group”>
<label for=”exampleInputEmail1″>Title</label>
<input type=”text” class=”form-control” id=”exampleInputTitle” placeholder=”Enter title”>
</div>
<div class=”form-group”>
<label for=”exampleInputBody”>Body</label>
<textarea class=”form-control” placeholder=”Enter body”>

</textarea>
</div>
<div class=”form-group”>
<label for=”exampleFormControlFile1″>Example file input</label>
<input type=”file” class=”form-control-file” id=”exampleFormControlFile1″>
</div>
<button type=”submit” class=”btn btn-primary”>Submit</button>
</form>
</div>
@endsection

Hfally 2019-01-21 16:03:01
Change your use to

use AppModelPost;

emmazoubi 2019-01-21 16:07:19
Hfally 2019-01-21 16:02:12
@extends(‘blog/index’)

@section(‘content’)

<div class=”container”>
<br>
<br>
@csrf
<form action=”{{ route(‘blog_store’) }}” method=”post”>
{{ csrf_field() }}
<div class=”form-group”>
<label for=”exampleInputEmail1″>Title</label>
<input type=”text” class=”form-control” id=”exampleInputTitle” placeholder=”Enter title”>
</div>
<div class=”form-group”>
<label for=”exampleInputBody”>Body</label>
<textarea class=”form-control” placeholder=”Enter body”>

</textarea>
</div>
<div class=”form-group”>
<label for=”exampleFormControlFile1″>Example file input</label>
<input type=”file” class=”form-control-file” id=”exampleFormControlFile1″>
</div>
<button type=”submit” class=”btn btn-primary”>Submit</button>
</form>
</div>
@endsection

I change it but i have another error IlluminateDatabaseQueryException thrown with message “SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘title’ cannot be null (SQL: insert into posts (title, body, image, updated_at, created_at) values (, , , 2019-01-21 13:03:59, 2019-01-21 13:03:59))”

Stacktrace:
#65 IlluminateDatabaseQueryException in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
#64 PDOException in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
#63 PDOStatement:execute in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
#62 IlluminateDatabaseConnection:IlluminateDatabase{closure} in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:657
#61 IlluminateDatabaseConnection:runQueryCallback in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
#60 IlluminateDatabaseConnection:run in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:459
#59 IlluminateDatabaseConnection:statement in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:411
#58 IlluminateDatabaseConnection:insert in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php:32
#57 IlluminateDatabaseQueryProcessorsProcessor:processInsertGetId in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2628
#56 IlluminateDatabaseQueryBuilder:insertGetId in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:1318
#55 IlluminateDatabaseEloquentBuilder:__call in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:823
#54 IlluminateDatabaseEloquentModel:insertAndSetId in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:788
#53 IlluminateDatabaseEloquentModel:performInsert in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:651
#52 IlluminateDatabaseEloquentModel:save in /home/pangraf/Project/blog/app/Http/Controllers/PostController.php:45
#51 AppHttpControllersPostController:store in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
#50 call_user_func_array in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
#49 IlluminateRoutingController:callAction in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45
#48 IlluminateRoutingControllerDispatcher:dispatch in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Route.php:219
#47 IlluminateRoutingRoute:runController in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Route.php:176
#46 IlluminateRoutingRoute:run in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Router.php:682
#45 IlluminateRoutingRouter:IlluminateRouting{closure} in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
#44 IlluminateRoutingPipeline:IlluminateRouting{closure} in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41
#43 IlluminateRoutingMiddlewareSubstituteBindings:handle in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
#42 IlluminatePipelinePipeline:IlluminatePipeline{closure} in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#41 IlluminateRoutingPipeline:IlluminateRouting{closure} in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:75

Hfally 2019-01-21 16:08:45
emmazoubi 2019-01-21 16:07:19
I change it but i have another error IlluminateDatabaseQueryException thrown with message “SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘title’ cannot be null (SQL: insert into posts (title, body, image, updated_at, created_at) values (, , , 2019-01-21 13:03:59, 2019-01-21 13:03:59))”

Stacktrace:
#65 IlluminateDatabaseQueryException in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
#64 PDOException in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
#63 PDOStatement:execute in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
#62 IlluminateDatabaseConnection:IlluminateDatabase{closure} in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:657
#61 IlluminateDatabaseConnection:runQueryCallback in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
#60 IlluminateDatabaseConnection:run in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:459
#59 IlluminateDatabaseConnection:statement in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:411
#58 IlluminateDatabaseConnection:insert in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php:32
#57 IlluminateDatabaseQueryProcessorsProcessor:processInsertGetId in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2628
#56 IlluminateDatabaseQueryBuilder:insertGetId in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:1318
#55 IlluminateDatabaseEloquentBuilder:__call in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:823
#54 IlluminateDatabaseEloquentModel:insertAndSetId in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:788
#53 IlluminateDatabaseEloquentModel:performInsert in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:651
#52 IlluminateDatabaseEloquentModel:save in /home/pangraf/Project/blog/app/Http/Controllers/PostController.php:45
#51 AppHttpControllersPostController:store in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
#50 call_user_func_array in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
#49 IlluminateRoutingController:callAction in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45
#48 IlluminateRoutingControllerDispatcher:dispatch in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Route.php:219
#47 IlluminateRoutingRoute:runController in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Route.php:176
#46 IlluminateRoutingRoute:run in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Router.php:682
#45 IlluminateRoutingRouter:IlluminateRouting{closure} in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
#44 IlluminateRoutingPipeline:IlluminateRouting{closure} in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41
#43 IlluminateRoutingMiddlewareSubstituteBindings:handle in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
#42 IlluminatePipelinePipeline:IlluminatePipeline{closure} in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
#41 IlluminateRoutingPipeline:IlluminateRouting{closure} in /home/pangraf/Project/blog/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:75

This is good

Hfally 2019-01-21 16:08:57
That means its getting to the controller now
yoofi_graham 2019-01-21 16:09:40
Yeah
Hfally 2019-01-21 16:09:51
Your title field doesn’t have a name
Hfally 2019-01-21 16:09:56
And also the body
Hfally 2019-01-21 16:10:53
@extends(‘blog/index’)

@section(‘content’)

<div class=”container”>
<br>
<br>
@csrf
<form action=”{{ route(‘blog_store’) }}” method=”post”>
{{ csrf_field() }}
<div class=”form-group”>
<label for=”exampleInputEmail1″>Title</label>
<input type=”text” class=”form-control” id=”exampleInputTitle” placeholder=”Enter title” name=”title”>
</div>
<div class=”form-group”>
<label for=”exampleInputBody”>Body</label>
<textarea class=”form-control” placeholder=”Enter body” name=”body”>

</textarea>
</div>
<div class=”form-group”>
<label for=”exampleFormControlFile1″>Example file input</label>
<input type=”file” class=”form-control-file” id=”exampleFormControlFile1″ name=”image”>
</div>
<button type=”submit” class=”btn btn-primary”>Submit</button>
</form>
</div>
@endsection

Hfally 2019-01-21 16:11:22
Try this
Hfally 2019-01-21 16:12:08
But, remember you are also not yet processing the upload of the image
Kaospolos 2019-01-21 16:45:41
emmazoubi 2019-01-21 13:01:12
Thank’s guys it work finaly.

Your welcome

pari_p_f 2019-01-21 16:47:06
laravel_discuss-672.jpg
Did you know that: similar to View::composer
#laravelphp
has a View::creator which allows you set default values that you can override in your controllers?

@laratools

brushe Vix 2019-01-21 16:51:43
how can i install node.js using cmd
brushe Vix 2019-01-21 16:52:38
i have tried using npm install command
dongmosteven 2019-01-21 17:22:36
brushe Vix 2019-01-21 16:51:43
how can i install node.js using cmd

Do you speak french ??

brushe Vix 2019-01-21 17:23:29
no
StanleyMasinde 2019-01-21 17:33:31
brushe Vix 2019-01-21 16:51:43
how can i install node.js using cmd

Go to nodejs.org and grab a setup

njadmin 2019-01-21 21:55:10
What is the best data table to create, update, and delete for Laravel?
2019-01-21 22:13:23
njadmin 2019-01-21 21:55:10
What is the best data table to create, update, and delete for Laravel?

Just a database it doesn’t matter language is universal

|