Good day
I'm trying to do two things witch are
1- I'm trying to delete a row from a table using a button at the same form there is another button witch is used to insert a row. Also in the same I'm selecting data from table But what I'm getting is inserting data even there are the delete command.. how shall I fix it..? This is my codes:
View
<br>
{!! Form::open(array('url'=>"/editor/attendance",'method'=>'post')) !!}
<br><br>
{!! Form::submit("blah ") !!} {!! Form::open("blah ") !!}
{!! Form::close() !!}'
controllers
public function mstore(Request $request)
{$mstore=\DB::table('attendance')->insert(['editor_com' => $request->input('editor_com')]);
return redirect('/editor/attendance');}
public function remove($id)
{ $meeting = DB::table('meeting')->where('meet_ID', $id)->delete();
return redirect('/editor/attendance');}
Routes
post('/editor/attendance','DatabaseController@mstore');
get('/editor/remove','DatabaseController@remove');
This is the first problem the second is When I try to store date from date picker it show for me 00-00-0000 I tried
$mstore = \DB::table('meeting')->insert(['date' => $request->input('date')]); to dd($request->input('date')); $mstore = \DB::table('meeting')->insert(['date' => $request->input('date')]);
It didn't store any values View
{!! Form::date('d-m-Y', '', array('id' => 'datepicker')) !!}
Controllers
$add->date = $request->input('date');
I'm Using laravel 5.1 Please help me Thank you Best Regard
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire