Membuat CRUD di Laravel 5 Dengan RESTful

You may also like...

59 Responses

  1. philips says:

    FatalErrorException in PegawaiController.php line 18: Class ‘App\Http\Controllers\Pegawai’ not found

    kok eror?

    • admin says:

      ada kemungkinan masnya salah memanggilnya di App\Http\Controllers\Pegawai, karena kalau mengikuti contoh diatas harusnya di panggil di App\Pegawai, karena secara default file model ada di direktori app/file_model, baru dipanggil di controllernya misalnya pakai use App\Pegawai;(tergantung masnya naruh file modelnya dmn). semoga membantu

    • fian says:

      pada controller PegawaiController.php tambahkan :

      ” use App\Pegawai; ” pada bagian atas.

      mungkin mas Admin lupa menginformasikan ini pada tahap pembuatan model 😀 CMIIW

    • admin says:

      benar mas fian.. 🙂

  2. taylor says:

    gan. kok pas jalanin php artisan serve mucunl gini di cmd [ErrorException]
    chdir(): No such file or directory (errno 2). dan nggak bisa jalan.

    • admin says:

      bisa dicoba dulu tambahkan pada file bootstrap/app.php:

      $app->bind(‘path.public’, function() {
      return __DIR__;
      });

      setelah baris berikut

      $app = new Illuminate\Foundation\Application(
      realpath(__DIR__ . ‘/../’)
      );

  3. gan saya udh ikutin tutorial

    saya coba cek
    dengan url seperti ini

    – localhost/laravel5/
    – localhost/laravel5/pegawai/
    – localhost/laravel5/public/pegawai/
    – localhost:8000/laravel5/
    – localhost:8000/laravel5/pegawai/
    – localhost:8000/laravel5/public/pegawai/

    Semuanya hasilnya not found gan 🙁

  4. sondang says:

    kalau seperti ini gimana mas solusi nya

    NotFoundHttpException in RouteCollection.php line 145:

    in RouteCollection.php line 145
    at RouteCollection->match(object(Request)) in Router.php line 729
    at Router->findRoute(object(Request)) in Router.php line 652
    at Router->dispatchToRoute(object(Request)) in Router.php line 628
    at Router->dispatch(object(Request)) in Kernel.php line 214
    at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 141
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in VerifyCsrfToken.php line 43
    at VerifyCsrfToken->handle(object(Request), object(Closure)) in VerifyCsrfToken.php line 17
    at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 125
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 55
    at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 125
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in StartSession.php line 61
    at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 125
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 36
    at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 125
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in EncryptCookies.php line 40
    at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 125
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 42
    at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 125
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
    at Pipeline->then(object(Closure)) in Kernel.php line 115
    at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84
    at Kernel->handle(object(Request)) in index.php line 53

  5. christian djahiras says:

    udah ditambahain App/pegawai di controllernya masih class not found app/pegawai …. kenapa ya gan

  6. pakhaxor says:

    Buat Data Baru
    Whoops, looks like something went wrong.
    1/1 FatalErrorException in a116bd2cb6fac8e64f68a6337dcf2628 line 17: Class ‘Form’ not found

    in a116bd2cb6fac8e64f68a6337dcf2628 line 17

    itu kenapa gan class formnya not found 🙁

  7. Pandu Warjaya says:

    Itu untuk update apabila kodingannya mengikuti seperti itu bagian edit tidak ada validasi data seperti create ya?

  8. Irfan says:

    udah konfigurasi html, tapi kok masi error ya gan. malah muncul error Class ‘Illuminate\Html\HtmlServiceProvider’ not found
    udah muter2 cari cara ya tetep aja errornya gitu 😀
    maklum masi blajar pertama.

  9. Arif says:

    Kalau error “Non-static method Illuminate\Http\Request::all() should not be called statically, assuming $this from incompatible context” kenapa ya gan?

  10. indra says:

    ini kenapa gan pas ane input data malah kaya gini ??

    ReflectionException in RouteDependencyResolverTrait.php line 57:
    Class App\Http\Controllers\CreatePegawaiRequest does not exist

    padahal CreatePegawaiRequest.php nya udah saya bikin di App\Http\Requests pa dengan cara
    php artisan make:request CreatePegawaiRequest

    terima kasih

  11. indra says:

    ReflectionException in RouteDependencyResolverTrait.php line 57:
    Class App\Http\Controllers\CreatePegawaiRequest does not exist

    ini kenapa gan padahal saya bikinnya pake “php artisan make:request CreatePegawaiRequest”, file CreatePegawaiRequest.php nya ada di folder request itu ada tapi pas di panggil sesuai dengan yang di atas kenapa jadi does not exist dan malah manggil di folder controlernya??

  12. muhamad nuryadi says:

    gan ini setiap buka localhostnya harus buka juga cmd : php artisan serve
    karena kalo dibuka http://localhost:8000/pegawai/ tanpa cmd : php artisan serve dia tidak mau terbuka

  13. oldsport says:

    kenapa ketika melakukan update muncul seperti berikut… mohon bantuannya
    ErrorException in VideoController.php line 83:
    Non-static method Illuminate\Http\Request::all() should not be called statically, assuming $this from incompatible context

  14. bejana uap says:

    coba pake ini
    use Illuminate\Support\Facades\Request;

  15. dhorie says:

    Gan, di CreatePegawaiRequest.php sudah saya panggil use App\Http\Requests\Request;

    tetapi kenapa masih keluar error “Class App\Http\Controllers\CreatePegawaiRequest does not exist” gan?

    mohon pencerahannya

  16. Topandi says:

    Terimakasih gan tutorial, membantu pemula seperti saya, ditunggu artikel lainnya 🙂

  17. Erwin sobirin says:

    Bagus gan,

  18. albar says:

    Kenapa ya mas, kok content saya muncul diatas layout.masters. Padahal posisi yieldnya udah sesuai contoh

    Jadi headernya malah muncul dibawah

    Thanks

  19. Iman Delau says:

    klo error nya gini mas apa yang salah ya..??

    InvalidArgumentException in FileViewFinder.php line 137:
    View [.pegawai.index] not found.

  20. Iman Delau says:

    yg atas solved.
    ni error yg baru lg mas.

    ErrorException in b2310a794eafef1c69a04797850d1f10 line 24:
    Undefined variable: pegawai (View: C:\xampp\htdocs\laravel\laravel-crud\resources\views\pegawai\index.blade.php)

  21. heru says:

    kalo errro gini knapa ya mas
    ErrorException in f7f89f4f112375df89869f5e0ca22e90b951eb02.php line 9:
    Undefined variable: errors (View: C:\wamp\www\laravel\crud\resources\views\pegawai\create.blade.php)

  22. humen says:

    not fund peggawai control nya
    yang saya baca komen diatas suruh tambah app/pegawaiconttroler
    maksud nya tambah dimana nya mas

  23. yoga says:

    trouble saya sama kayak mas heru..
    bantuannya bang admin

  24. yoga says:

    trouble saya sama kayak mas heru..gagal masuk Buat Data Baru
    bantuannya bang admin

  25. achrousz says:

    ErrorException in PegawaiController.php line 39:
    Undefined variable: request

    kenapa ya gan ?

  26. sgtkuncoro says:

    gan mau tanya sayamuncul eror mas saat insert data pesan erornya kayak gini
    MassAssignmentException in Model.php line 448:
    _token

    thanks

  27. yadi says:

    [Symfony\Component\Debug\Exception\FatalErrorException]
    Call to undefined method illuminate\Foundation\Application::binShared()

  28. muyas says:

    gan mau tanya,di setiap tutorial yg saya pelajari, ketika membuat controller baru selalu sudah include fungsi-fungsi resource seperti index(), create(), store(), show(), dll. Tapi ketika saya membuat controller kenapa tidak ada fungsi” tsb di file controller.php nya ya gan? apa saya salah dalam penginstalan atau bagaimana? terimakasih sebelumnya

  29. budi aman says:

    Mas pas sya menjalankan

    php artisan migrate

    Terjadi error seprti ini :

    ‘Undefined index: Driver’ e

    Mohon solusinya mas

  30. Ardhiyan says:

    mas saya mau tanya, php artisan serve ini nunggu sampe kapan ya mas? trus runningnya link nya pakai yg mana ya? maaf baru belajar

  31. error form not found install https://laravelcollective.com/docs/5.2/html

    delete yang ilumminate

  32. hello om saat sudah selesai konfigurasi berjalan noraml tapi saat mau input error dan solved dengan koment salah satu member

    Kalau saya diatasnya diatambah :
    use App\Http\Requests\CreatePegawaiRequest;
    setelah :
    use App\Http\Requests;

    cuma ketika edit dan hapus kenapa error juga ya, itu selip dimana ya

    http://www.sidaurukfreddy.com

  33. agum says:

    FatalErrorException in Controller.php line 9:
    Trait ‘Illuminate\Foundation\Bus\DispatchesCommands’ not found

  34. Kresna says:

    InvalidArgumentException in FileViewFinder.php line 137:

    View [pegawai.index] not found.

    Saya newbie nih di laravel. Pas ngikutin dari awal ampe akhir keluarnya gini min. Mungkin ada solusi? TErimakasih 🙂

Leave a Reply to Aku Belajar Cancel reply

Your email address will not be published. Required fields are marked *