PresentationTrait.php 570 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Http\Traits;
  3. use App\Models\Presentation;
  4. trait PresentationTrait {
  5. public function index() {
  6. $presentations = Presentation::all();
  7. return view('backend.presentation.index')->with(compact('presentations'));
  8. }
  9. public function Create(){
  10. $presentation = Presentation::all();
  11. if($presentation->isEmpty()){
  12. return view('backend.presentation.add');
  13. }else{
  14. abort(404);
  15. }
  16. }
  17. }