laravel 一点操作

不知道怎么用,去官网找api和教程

https://laravel.com/api/5.1/classes.html

………………………………  

      $data = '0';

        $cnt = DB::table('tbuser')->where('uname', $request->uname)->value('uid');
        if ($cnt > 0) {
            $data = '1';
            return view('pages.register')->withData($data);
        } 
        
        $uid = DB::table('tbuser')->insertGetId( ['uemail' => $request->uemail,
                                                                                 'uname' => $request->uname,
                                                                                 'upwd' => $request->upwd,
                                                                                 'uschoolname' => $request->uschool,
                                                                                 'uheadpic' => $request->uheadpic   ] );
       Session::put('uname', $request->uname);
       Session::put('uid', $uid);

       return view('pages.register')->withData($data);

………………………………………………

Route::delete('/task/{id}', function ($id) {

})

app.blade.php @yield

@extends('app')

@yield

插入自己的内容

@yield


return redirect('/')->withInput()->withErrors($validator);



@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops! Something went wrong!</strong>
<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif


href="detail?bookid=2"

if ($_GET['bookid'] != null) ...

if ($request->has('bookid')) $bookid = $request->input('bookid')


<form action="test?task=doitnow" method="post">

{{method_field("delete")}}

</form>

伪造delete方法



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值