Laravel5 student score management system-07-Add Sidebar

Source: Internet
Author: User
Laravel5 student score management system-07-Add Sidebar
You may see the right column in the image above. let's finish it first and then implement its functions one by one. replace read2 with ** read2 => @ include ('admin. right_bar ') ** _ admin/index. blade. php _ "@ extends ('Master') {-- inherits the master template -- }}@ section ('title') administrator @ stop @ section ('content ')

@ Include ('errors. list') student information table

@ If (count ($ users) @ foreach ($ users as $ user) Read1 @ endforeach @ else no student list, ask the administrator to add @ endif
Student ID Name Gender Mobile phone Class Email Operation
{$ User-> id }} {$ User-> name }} {$ User-> sex }} {{$ User-> phone }} {{$ User-> pro_class }} {$ User-> email }} Update score
{-- Pagination --}}} Render ();?>

Read2

@ Stop "! [Enter picture description] (http://img2.ph.126.net/eC6f0VCiWj85AnBCZh_U_g==/3355744672446850589.jpg "enter picture title here") "@ include ('admin. right_bar ')" then create ** Admin/right_bar.blade.php **:"

Total: {$ count }}Student list

Add student

Score Ranking

Download List

Export score

"Student list -- return to student list, that is, http: // localhost: 8000/admin add student -- add student page, that is, http: // localhost: 8000/admin/create Score Ranking-view the score list, that is, http: // localhost: 8000/admin/grade download list -- download student information Excel export score -- download student score Excel add student, corresponding to the create method in AdminController: "public function create () {$ result = User:: where ('is _ admin', 0); $ count = $ result-> count (); return view ('admin. create ', compact ('count');} "then create Admin/create. blade. php: "@ extends ('Master') {-- inherits the master template -- }}@ section ('title') to add students @ stop @ section ('content ')

Add student

@ Include ('errors. list ')

{!! Form: model ($ user = new \ App \ UsersInfo, ['URL' => 'admin/', 'class' => 'form-horizontal'])!}

{!! Form: label ('id', 'Student id: ', ['class' => 'control-label col-md-1'])!}

{!! Form: text ('id', old ('id'), ['class' => 'form-control'])!}

{!! Form: label ('name', 'Name: ', ['class' => 'control-label col-md-1'])!}

{!! Form: text ('name', old ('name'), ['class' => 'form-control', 'required'])!}

{!! Form: submit ('finished, create', ['class' => 'btn btn-success form-control'])!}

{!! Form: close ()!!}

@ Include ('admin. right_bar ')

@ Stop "click" add student :! [Enter picture description] (http://img2.ph.126.net/X-coZOxhAC6V5qYOaQTPGg==/6599300675750906321.jpg "enter picture title here") here we ** Form: model (obj, [options]) **, input a new object $ user. here you can view/vendor/illuminate/html/FormBuilder. in php, the model method, Form automatically fills in the Form for you. here, because it is new and the Form is empty, you will understand it later. next, let's look at our url, http: // localhost: 8000/admin, corresponding to the store method in the controller,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.