├── .env.example ├── .gitattributes ├── .gitignore ├── _ide_helper.php ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Handlers │ └── LfmConfigHandler.php ├── Http │ ├── Controllers │ │ ├── AnasayfaController.php │ │ ├── Controller.php │ │ ├── KategoriController.php │ │ ├── KullaniciController.php │ │ ├── OdemeController.php │ │ ├── SepetController.php │ │ ├── SiparisController.php │ │ ├── UrunController.php │ │ └── Yonetim │ │ │ ├── AnasayfaController.php │ │ │ ├── KategoriController.php │ │ │ ├── KullaniciController.php │ │ │ ├── SiparisController.php │ │ │ └── UrunController.php │ ├── Kernel.php │ └── Middleware │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ ├── VerifyCsrfToken.php │ │ └── Yonetim.php ├── Mail │ └── KullaniciKayitMail.php ├── Models │ ├── Ayar.php │ ├── Kategori.php │ ├── Kullanici.php │ ├── KullaniciDetay.php │ ├── Sepet.php │ ├── SepetUrun.php │ ├── Siparis.php │ ├── Urun.php │ └── UrunDetay.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php └── helpers.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cart.php ├── database.php ├── filesystems.php ├── hashing.php ├── lfm.php ├── logging.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2017_10_17_183408_create_kategori_table.php │ ├── 2017_10_29_114953_create_urun_table.php │ ├── 2017_11_02_170735_create_kategori_urun_table.php │ ├── 2017_11_05_101237_create_urun_detay_table.php │ ├── 2017_11_10_191439_create_kullanici_table.php │ ├── 2017_11_17_200454_create_sepet_table.php │ ├── 2017_11_19_184606_create_sepet_urun_table.php │ ├── 2017_11_26_131901_create_siparis_table.php │ ├── 2017_11_26_133711_create_kullanici_detay_table.php │ └── 2018_06_19_194441_create_ayar_table.php └── seeds │ ├── DatabaseSeeder.php │ ├── KategoriTableSeeder.php │ ├── KullaniciTableSeeder.php │ └── UrunTableSeeder.php ├── laravel_ecommerce.sql ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ └── app.css ├── favicon.ico ├── fonts │ └── vendor │ │ └── bootstrap-sass │ │ └── bootstrap │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 ├── img │ └── logo.png ├── index.php ├── mix-manifest.json ├── robots.txt ├── vendor │ └── laravel-filemanager │ │ ├── css │ │ ├── cropper.min.css │ │ ├── dropzone.min.css │ │ ├── lfm.css │ │ └── mfb.css │ │ ├── img │ │ ├── folder.png │ │ └── loader.svg │ │ └── js │ │ ├── cropper.min.js │ │ ├── dropzone.min.js │ │ ├── jquery.form.min.js │ │ ├── lfm.js │ │ ├── mfb.js │ │ └── script.js └── web.config ├── readme.md ├── resources ├── assets │ ├── js │ │ ├── admin-app.js │ │ ├── app.js │ │ └── bootstrap.js │ └── sass │ │ ├── _variables.scss │ │ ├── admin.scss │ │ ├── app.scss │ │ ├── commerce.scss │ │ └── login.scss ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── anasayfa.blade.php │ ├── arama.blade.php │ ├── errors │ ├── 404.blade.php │ └── 500.blade.php │ ├── kategori.blade.php │ ├── kullanici │ ├── kaydol.blade.php │ └── oturumac.blade.php │ ├── layouts │ ├── master.blade.php │ └── partials │ │ ├── alert.blade.php │ │ ├── errors.blade.php │ │ ├── footer.blade.php │ │ ├── head.blade.php │ │ └── navbar.blade.php │ ├── mails │ └── kullanici_kayit.blade.php │ ├── odeme.blade.php │ ├── sepet.blade.php │ ├── siparis.blade.php │ ├── siparisler.blade.php │ ├── urun.blade.php │ └── yonetim │ ├── anasayfa.blade.php │ ├── kategori │ ├── form.blade.php │ └── index.blade.php │ ├── kullanici │ ├── form.blade.php │ └── index.blade.php │ ├── layouts │ ├── master.blade.php │ └── partials │ │ ├── navbar.blade.php │ │ └── sidebar.blade.php │ ├── oturumac.blade.php │ ├── siparis │ ├── form.blade.php │ └── index.blade.php │ └── urun │ ├── form.blade.php │ └── index.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_LOG_LEVEL=debug 6 | APP_URL=http://localhost 7 | 8 | DB_CONNECTION=mysql 9 | DB_HOST=127.0.0.1 10 | DB_PORT=3306 11 | DB_DATABASE=homestead 12 | DB_USERNAME=homestead 13 | DB_PASSWORD=secret 14 | 15 | BROADCAST_DRIVER=log 16 | CACHE_DRIVER=file 17 | SESSION_DRIVER=file 18 | QUEUE_DRIVER=sync 19 | 20 | REDIS_HOST=127.0.0.1 21 | REDIS_PASSWORD=null 22 | REDIS_PORT=6379 23 | 24 | MAIL_DRIVER=smtp 25 | MAIL_HOST=smtp.mailtrap.io 26 | MAIL_PORT=2525 27 | MAIL_USERNAME=null 28 | MAIL_PASSWORD=null 29 | MAIL_ENCRYPTION=null 30 | 31 | PUSHER_APP_ID= 32 | PUSHER_APP_KEY= 33 | PUSHER_APP_SECRET= 34 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/css 3 | /public/js 4 | /public/uploads 5 | /public/storage 6 | /storage/*.key 7 | /vendor 8 | /.idea 9 | /.vagrant 10 | Homestead.json 11 | Homestead.yaml 12 | npm-debug.log 13 | yarn-error.log 14 | .env 15 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | $this->load(__DIR__.'/Commands'); 39 | 40 | require base_path('routes/console.php'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | view('errors.404', compact('exception'), 404); 57 | } 58 | 59 | if ($exception instanceof ModelNotFoundException) 60 | { 61 | return response()->view('errors.404', compact('exception'), 404); 62 | } 63 | 64 | return parent::render($request, $exception); 65 | } 66 | 67 | protected function unauthenticated($request, AuthenticationException $exception) 68 | { 69 | return $request->expectsJson() 70 | ? response()->json(['message' => 'Unauthenticated.'], 401) 71 | : redirect()->guest(route('kullanici.oturumac')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/Handlers/LfmConfigHandler.php: -------------------------------------------------------------------------------- 1 | user()->id; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/Http/Controllers/AnasayfaController.php: -------------------------------------------------------------------------------- 1 | take(8)->get(); 13 | 14 | $urunler_slider = Urun::select('urun.*') 15 | ->join('urun_detay', 'urun_detay.urun_id', 'urun.id') 16 | ->where('urun_detay.goster_slider', 1) 17 | ->orderBy('guncelleme_tarihi', 'desc') 18 | ->take(config('ayar.anasayfa_slider_urun_adet'))->get(); 19 | 20 | $urun_gunun_firsati = Urun::select('urun.*') 21 | ->join('urun_detay', 'urun_detay.urun_id', 'urun.id') 22 | ->where('urun_detay.goster_gunun_firsati', 1) 23 | ->orderBy('guncelleme_tarihi', 'desc') 24 | ->first(); 25 | 26 | $urunler_one_cikan = Urun::select('urun.*') 27 | ->join('urun_detay', 'urun_detay.urun_id', 'urun.id') 28 | ->where('urun_detay.goster_one_cikan', 1) 29 | ->orderBy('guncelleme_tarihi', 'desc') 30 | ->take(get_ayar('anasayfa_liste_urun_adet'))->get(); 31 | 32 | $urunler_cok_satan = Urun::select('urun.*') 33 | ->join('urun_detay', 'urun_detay.urun_id', 'urun.id') 34 | ->where('urun_detay.goster_cok_satan', 1) 35 | ->orderBy('guncelleme_tarihi', 'desc') 36 | ->take(get_ayar('anasayfa_liste_urun_adet'))->get(); 37 | 38 | $urunler_indirimli = Urun::select('urun.*') 39 | ->join('urun_detay', 'urun_detay.urun_id', 'urun.id') 40 | ->where('urun_detay.goster_indirimli', 1) 41 | ->orderBy('guncelleme_tarihi', 'desc') 42 | ->take(get_ayar('anasayfa_liste_urun_adet'))->get(); 43 | 44 | return view('anasayfa', compact('kategoriler', 'urunler_slider', 'urun_gunun_firsati', 'urunler_one_cikan', 'urunler_cok_satan', 'urunler_indirimli')); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | firstOrFail(); 12 | $alt_kategoriler = Kategori::where('ust_id', $kategori->id)->get(); 13 | $ust_kategori = Kategori::find($kategori->ust_id); 14 | 15 | $order = request('order'); 16 | if ($order == 'coksatanlar') { 17 | 18 | $urunler = $kategori->urunler() 19 | ->join('urun_detay', 'urun_detay.urun_id', 'urun.id') 20 | ->orderBy('urun_detay.goster_cok_satan', 'desc') 21 | ->paginate(3); 22 | 23 | } else if ($order == 'yeni') { 24 | $urunler = $kategori->urunler() 25 | ->orderByDesc('guncelleme_tarihi') 26 | ->paginate(3); 27 | } else { 28 | $urunler = $kategori->urunler() 29 | ->orderByDesc('guncelleme_tarihi') 30 | ->paginate(3); 31 | } 32 | 33 | if (request('page') > $urunler->lastPage()) 34 | return redirect()->route('kategori', $kategori->slug); 35 | 36 | return view('kategori', compact('kategori', 'alt_kategoriler', 'ust_kategori', 'urunler')); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/KullaniciController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('oturumukapat'); 20 | } 21 | 22 | public function giris_form() 23 | { 24 | return view('kullanici.oturumac'); 25 | } 26 | 27 | public function giris() 28 | { 29 | $this->validate(request(), [ 30 | 'email' => 'required|email', 31 | 'sifre' => 'required' 32 | ]); 33 | 34 | $credentials = [ 35 | 'email' => request('email'), 36 | 'password' => request('sifre'), 37 | 'aktif_mi' => 1 38 | ]; 39 | if (auth()->attempt($credentials, request()->has('benihatirla'))) { 40 | $aktif_sepet_id = Sepet::aktif_sepet_id(); 41 | if (is_null($aktif_sepet_id)) { 42 | $aktif_sepet = Sepet::create(['kullanici_id' => auth()->id()]); 43 | $aktif_sepet_id = $aktif_sepet->id; 44 | } 45 | session()->put('aktif_sepet_id', $aktif_sepet_id); 46 | 47 | if (Cart::count() > 0) { 48 | foreach (Cart::content() as $cartItem) { 49 | $sepetUrun = SepetUrun::firstOrNew(['sepet_id' => $aktif_sepet_id, 'urun_id' => $cartItem->id]); 50 | $sepetUrun->adet += $cartItem->qty; 51 | $sepetUrun->fiyati = $cartItem->price; 52 | $sepetUrun->durum = "Beklemede"; 53 | $sepetUrun->save(); 54 | } 55 | } 56 | 57 | Cart::destroy(); 58 | $sepetUrunler = SepetUrun::with('urun')->where('sepet_id', $aktif_sepet_id)->get(); 59 | foreach ($sepetUrunler as $sepetUrun) { 60 | Cart::add($sepetUrun->urun->id, $sepetUrun->urun->urun_adi, $sepetUrun->adet, $sepetUrun->fiyati, ['slug' => $sepetUrun->urun->slug]); 61 | } 62 | 63 | return redirect()->intended('/'); 64 | } else { 65 | $errors = ['email' => 'Hatalı giriş']; 66 | 67 | return back()->withErrors($errors); 68 | } 69 | } 70 | 71 | public function kaydol_form() 72 | { 73 | return view('kullanici.kaydol'); 74 | } 75 | 76 | public function kaydol() 77 | { 78 | $this->validate(request(), [ 79 | 'adsoyad' => 'required|min:5|max:60', 80 | 'email' => 'required|email|unique:kullanici', 81 | 'sifre' => 'required|confirmed|min:5|max:15' 82 | ]); 83 | 84 | $kullanici = Kullanici::create([ 85 | 'adsoyad' => request('adsoyad'), 86 | 'email' => request('email'), 87 | 'sifre' => Hash::make(request('sifre')), 88 | 'aktivasyon_anahtari' => Str::random(60), 89 | 'aktif_mi' => 0 90 | ]); 91 | $kullanici->detay()->save(new KullaniciDetay()); 92 | 93 | Mail::to(request('email'))->send(new KullaniciKayitMail($kullanici)); 94 | 95 | auth()->login($kullanici); 96 | 97 | return redirect()->route('anasayfa'); 98 | } 99 | 100 | public function aktiflestir($anahtar) 101 | { 102 | $kullanici = Kullanici::where('aktivasyon_anahtari', $anahtar)->first(); 103 | if (!is_null($kullanici)) { 104 | $kullanici->aktivasyon_anahtari = null; 105 | $kullanici->aktif_mi = 1; 106 | $kullanici->save(); 107 | 108 | return redirect()->to('/') 109 | ->with('mesaj', 'Kullanıcı kaydınız aktifleştirildi') 110 | ->with('mesaj_tur', 'success'); 111 | } else { 112 | return redirect()->to('/') 113 | ->with('mesaj', 'Kullanıcı kaydınız aktifleştirilemedi') 114 | ->with('mesaj_tur', 'warning'); 115 | } 116 | } 117 | 118 | public function oturumukapat() 119 | { 120 | auth()->logout(); 121 | 122 | return redirect()->route('anasayfa'); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /app/Http/Controllers/OdemeController.php: -------------------------------------------------------------------------------- 1 | check()) { 13 | return redirect()->route('kullanici.oturumac') 14 | ->with('mesaj_tur', 'info') 15 | ->with('mesaj', 'Ödeme işlemi için oturum açmanız veye kullanıcı kaydı yapmanız gerekmektedir.'); 16 | } else if (count(Cart::content()) == 0) { 17 | return redirect()->route('anasayfa') 18 | ->with('mesaj_tur', 'info') 19 | ->with('mesaj', 'Ödeme işlemi için sepetinizde bir ürün bulunmalıdır.'); 20 | } 21 | 22 | $kullanici_detay = auth()->user()->detay; 23 | 24 | return view('odeme', compact('kullanici_detay')); 25 | } 26 | 27 | public function odemeyap() 28 | { 29 | $siparis = request()->all(); 30 | $siparis['sepet_id'] = session('aktif_sepet_id'); 31 | $siparis['banka'] = "Garanti"; 32 | $siparis['taksit_sayisi'] = 1; 33 | $siparis['durum'] = "Siparişiniz alındı"; 34 | $siparis['siparis_tutari'] = Cart::subtotal(); 35 | 36 | Siparis::create($siparis); 37 | Cart::destroy(); 38 | session()->forget('aktif_sepet_id'); 39 | 40 | return redirect()->route('siparisler') 41 | ->with('mesaj_tur', 'success') 42 | ->with('mesaj', 'Ödemeniz başarılı bir şekilde gerçekleştirildi.'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Controllers/SepetController.php: -------------------------------------------------------------------------------- 1 | id, $urun->urun_adi, $adet, $urun->fiyati, ['slug' => $urun->slug]); 23 | 24 | if (auth()->check()) { 25 | $aktif_sepet_id = session('aktif_sepet_id'); 26 | if (!isset($aktif_sepet_id)) { 27 | $aktif_sepet = Sepet::create([ 28 | 'kullanici_id' => auth()->id() 29 | ]); 30 | $aktif_sepet_id = $aktif_sepet->id; 31 | session()->put('aktif_sepet_id', $aktif_sepet_id); 32 | } 33 | 34 | SepetUrun::updateOrCreate( 35 | ['sepet_id' => $aktif_sepet_id, 'urun_id' => $urun->id], 36 | ['adet' => $cartItem->qty, 'fiyati' => $urun->fiyati, 'durum' => 'Beklemede'] 37 | ); 38 | } 39 | 40 | return redirect()->route('sepet') 41 | ->with('mesaj_tur', 'success') 42 | ->with('mesaj', 'Ürün sepete eklendi.'); 43 | } 44 | 45 | public function kaldir($rowid) 46 | { 47 | if (auth()->check()) { 48 | $aktif_sepet_id = session('aktif_sepet_id'); 49 | $cartItem = Cart::get($rowid); 50 | SepetUrun::where('sepet_id', $aktif_sepet_id)->where('urun_id', $cartItem->id)->delete(); 51 | } 52 | 53 | Cart::remove($rowid); 54 | 55 | return redirect()->route('sepet') 56 | ->with('mesaj_tur', 'success') 57 | ->with('mesaj', 'Ürün sepetten kaldırıldı.'); 58 | } 59 | 60 | public function bosalt() 61 | { 62 | if (auth()->check()) { 63 | $aktif_sepet_id = session('aktif_sepet_id'); 64 | SepetUrun::where('sepet_id', $aktif_sepet_id)->delete(); 65 | } 66 | 67 | Cart::destroy(); 68 | 69 | return redirect()->route('sepet') 70 | ->with('mesaj_tur', 'success') 71 | ->with('mesaj', 'Sepetiniz boşaltıldı.'); 72 | } 73 | 74 | public function guncelle($rowid) 75 | { 76 | $validator = Validator::make(request()->all(), [ 77 | 'adet' => 'required|numeric|between:0,5' 78 | ]); 79 | 80 | if ($validator->fails()) { 81 | session()->flash('mesaj_tur', 'danger'); 82 | session()->flash('mesaj', 'Adet değeri en az 1 en fazla 5 olabilir!'); 83 | 84 | return response()->json(['success' => false]); 85 | } 86 | 87 | if (auth()->check()) { 88 | $aktif_sepet_id = session('aktif_sepet_id'); 89 | $cartItem = Cart::get($rowid); 90 | 91 | if (request('adet') == 0) 92 | SepetUrun::where('sepet_id', $aktif_sepet_id)->where('urun_id', $cartItem->id) 93 | ->delete(); 94 | else 95 | SepetUrun::where('sepet_id', $aktif_sepet_id)->where('urun_id', $cartItem->id) 96 | ->update(['adet' => request('adet')]); 97 | } 98 | 99 | Cart::update($rowid, request('adet')); 100 | 101 | session()->flash('mesaj_tur', 'success'); 102 | session()->flash('mesaj', 'Adet bilgisi güncellendi'); 103 | 104 | return response()->json(['success' => true]); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /app/Http/Controllers/SiparisController.php: -------------------------------------------------------------------------------- 1 | whereHas('sepet', function($query) { 14 | $query->where('kullanici_id', auth()->id()); 15 | }) 16 | ->orderByDesc('olusturma_tarihi') 17 | ->get(); 18 | 19 | return view('siparisler', compact('siparisler')); 20 | } 21 | 22 | public function detay($id) 23 | { 24 | $siparis = Siparis::with('sepet.sepet_urunler.urun') 25 | ->whereHas('sepet', function($query) { 26 | $query->where('kullanici_id', auth()->id()); 27 | }) 28 | ->where('siparis.id', $id) 29 | ->firstOrFail(); 30 | 31 | return view('siparis', compact('siparis')); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Controllers/UrunController.php: -------------------------------------------------------------------------------- 1 | firstOrFail(); 13 | $kategoriler = $urun->kategoriler()->distinct()->get(); 14 | return view('urun', compact('urun', 'kategoriler')); 15 | } 16 | 17 | public function ara() 18 | { 19 | $aranan = request('aranan'); 20 | $urunler = Urun::where('urun_adi', 'like', "%$aranan%") 21 | ->orWhere('aciklama', 'like', "%$aranan%") 22 | ->paginate(2); 23 | //->simplePaginate(2); 24 | 25 | request()->flash(); 26 | return view('arama', compact('urunler')); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Controllers/Yonetim/AnasayfaController.php: -------------------------------------------------------------------------------- 1 | join('sepet', 'sepet.id', 'siparis.sepet_id') 25 | ->join('sepet_urun', 'sepet.id', 'sepet_urun.sepet_id') 26 | ->join('urun', 'urun.id', 'sepet_urun.urun_id') 27 | ->groupBy('urun_adi') 28 | ->orderBy(DB::raw('SUM(sepet_urun.adet)'), 'desc') 29 | ->get();*/ 30 | 31 | $aylara_gore_satislar = DB::select(" 32 | SELECT 33 | DATE_FORMAT(si.olusturma_tarihi, '%Y-%m') ay, sum(su.adet) adet 34 | FROM siparis si 35 | INNER JOIN sepet s on s.id = si.sepet_id 36 | INNER JOIN sepet_urun su on s.id=su.sepet_id 37 | GROUP BY DATE_FORMAT(si.olusturma_tarihi, '%Y-%m') 38 | ORDER BY DATE_FORMAT(si.olusturma_tarihi, '%Y-%m') 39 | "); 40 | 41 | return view('yonetim.anasayfa', compact('cok_satan_urunler', 'aylara_gore_satislar')); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Http/Controllers/Yonetim/KategoriController.php: -------------------------------------------------------------------------------- 1 | filled('aranan') || request()->filled('ust_id')) { 13 | request()->flash(); 14 | $aranan = request('aranan'); 15 | $ust_id = request('ust_id'); 16 | $list = Kategori::with('ust_kategori') 17 | ->where('kategori_adi', 'like', "%$aranan%") 18 | ->where('ust_id', $ust_id) 19 | ->orderByDesc('id') 20 | ->paginate(2) 21 | ->appends(['aranan' => $aranan, 'ust_id' => $ust_id]); 22 | } else { 23 | request()->flush(); 24 | $list = Kategori::with('ust_kategori')->orderByDesc('id')->paginate(8); 25 | } 26 | 27 | $anakategoriler = Kategori::whereRaw('ust_id is null')->get(); 28 | 29 | return view('yonetim.kategori.index', compact('list', 'anakategoriler')); 30 | } 31 | 32 | public function form($id = 0) 33 | { 34 | $entry = new Kategori; 35 | if ($id > 0) { 36 | $entry = Kategori::find($id); 37 | } 38 | 39 | $kategoriler = Kategori::all(); 40 | 41 | return view('yonetim.kategori.form', compact('entry', 'kategoriler')); 42 | } 43 | 44 | public function kaydet($id = 0) 45 | { 46 | $data = request()->only('kategori_adi', 'slug', 'ust_id'); 47 | if (!request()->filled('slug')) { 48 | $data['slug'] = str_slug(request('kategori_adi')); 49 | request()->merge(['slug' => $data['slug']]); 50 | } 51 | 52 | $this->validate(request(), [ 53 | 'kategori_adi' => 'required', 54 | 'slug' => (request('original_slug') != request('slug') ? 'unique:kategori,slug' : '') 55 | ]); 56 | 57 | if ($id > 0) { 58 | $entry = Kategori::where('id', $id)->firstOrFail(); 59 | $entry->update($data); 60 | } else { 61 | $entry = Kategori::create($data); 62 | } 63 | 64 | return redirect() 65 | ->route('yonetim.kategori.duzenle', $entry->id) 66 | ->with('mesaj', ($id > 0 ? 'Güncellendi' : 'Kaydedildi')) 67 | ->with('mesaj_tur', 'success'); 68 | } 69 | 70 | public function sil($id) 71 | { 72 | $kategori = Kategori::find($id); 73 | $kategori_urun_adet = $kategori->urunler()->count(); 74 | if ($kategori_urun_adet>0) 75 | { 76 | return redirect() 77 | ->route('yonetim.kategori') 78 | ->with('mesaj', "Bu kategoride $kategori_urun_adet adet ürün var. Bu yüzden silme işlemi yapılmamıştır.") 79 | ->with('mesaj_tur', 'warning'); 80 | } 81 | $kategori->urunler()->detach(); 82 | $kategori->delete(); 83 | 84 | return redirect() 85 | ->route('yonetim.kategori') 86 | ->with('mesaj', 'Kayıt silindi') 87 | ->with('mesaj_tur', 'success'); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /app/Http/Controllers/Yonetim/KullaniciController.php: -------------------------------------------------------------------------------- 1 | isMethod('POST')) { 16 | $this->validate(request(), [ 17 | 'email' => 'required|email', 18 | 'sifre' => 'required' 19 | ]); 20 | 21 | $credentials = [ 22 | 'email' => request()->get('email'), 23 | 'password' => request()->get('sifre'), 24 | 'yonetici_mi' => 1, 25 | 'aktif_mi' => 1 26 | ]; 27 | 28 | if (Auth::guard('yonetim')->attempt($credentials, request()->has('benihatirla'))) { 29 | return redirect()->route('yonetim.anasayfa'); 30 | } else { 31 | return back()->withInput()->withErrors(['email' => 'Giriş hatalı!']); 32 | } 33 | } 34 | 35 | return view('yonetim.oturumac'); 36 | } 37 | 38 | public function oturumukapat() 39 | { 40 | Auth::guard('yonetim')->logout(); 41 | 42 | return redirect()->route('yonetim.oturumac'); 43 | } 44 | 45 | public function index() 46 | { 47 | if (request()->filled('aranan')) { 48 | request()->flash(); 49 | $aranan = request('aranan'); 50 | $list = Kullanici::where('adsoyad', 'like', "%$aranan%") 51 | ->orWhere('email', 'like', "%$aranan%") 52 | ->orderByDesc('olusturma_tarihi') 53 | ->paginate(8) 54 | ->appends('aranan', $aranan); 55 | } else { 56 | $list = Kullanici::orderByDesc('olusturma_tarihi')->paginate(8); 57 | } 58 | 59 | return view('yonetim.kullanici.index', compact('list')); 60 | } 61 | 62 | public function form($id = 0) 63 | { 64 | $entry = new Kullanici; 65 | if ($id > 0) { 66 | $entry = Kullanici::find($id); 67 | } 68 | 69 | return view('yonetim.kullanici.form', compact('entry')); 70 | } 71 | 72 | public function kaydet($id = 0) 73 | { 74 | $this->validate(request(), [ 75 | 'adsoyad' => 'required', 76 | 'email' => 'required|email' 77 | ]); 78 | 79 | $data = request()->only('adsoyad', 'email'); 80 | if (request()->filled('sifre')) { 81 | $data['sifre'] = Hash::make(request('sifre')); 82 | } 83 | $data['aktif_mi'] = request()->has('aktif_mi') && request('aktif_mi') == 1 ? 1 : 0; 84 | $data['yonetici_mi'] = request()->has('yonetici_mi') && request('yonetici_mi') == 1 ? 1 : 0; 85 | 86 | if ($id > 0) { 87 | $entry = Kullanici::where('id', $id)->firstOrFail(); 88 | $entry->update($data); 89 | } else { 90 | $entry = Kullanici::create($data); 91 | } 92 | 93 | KullaniciDetay::updateOrCreate( 94 | ['kullanici_id' => $entry->id], 95 | [ 96 | 'adres' => request('adres'), 97 | 'telefon' => request('telefon'), 98 | 'ceptelefonu' => request('ceptelefonu') 99 | ] 100 | ); 101 | 102 | return redirect() 103 | ->route('yonetim.kullanici.duzenle', $entry->id) 104 | ->with('mesaj', ($id > 0 ? 'Güncellendi' : 'Kaydedildi')) 105 | ->with('mesaj_tur', 'success'); 106 | } 107 | 108 | public function sil($id) 109 | { 110 | Kullanici::destroy($id); 111 | 112 | return redirect() 113 | ->route('yonetim.kullanici') 114 | ->with('mesaj', 'Kayıt silindi') 115 | ->with('mesaj_tur', 'success'); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /app/Http/Controllers/Yonetim/SiparisController.php: -------------------------------------------------------------------------------- 1 | filled('aranan')) { 13 | request()->flash(); 14 | $aranan = request('aranan'); 15 | $list = Siparis::with('sepet.kullanici') 16 | ->where('adsoyad', 'like', "%$aranan%") 17 | ->orWhere('id', $aranan) 18 | ->orderByDesc('id') 19 | ->paginate(8) 20 | ->appends('aranan', $aranan); 21 | } else { 22 | $list = Siparis::with('sepet.kullanici') 23 | ->orderByDesc('id') 24 | ->paginate(8); 25 | } 26 | 27 | return view('yonetim.siparis.index', compact('list')); 28 | } 29 | 30 | public function form($id = 0) 31 | { 32 | if ($id > 0) { 33 | $entry = Siparis::with('sepet.sepet_urunler.urun')->find($id); 34 | } 35 | 36 | return view('yonetim.siparis.form', compact('entry')); 37 | } 38 | 39 | public function kaydet($id = 0) 40 | { 41 | $this->validate(request(), [ 42 | 'adsoyad' => 'required', 43 | 'adres' => 'required', 44 | 'telefon' => 'required', 45 | 'durum' => 'required' 46 | ]); 47 | 48 | $data = request()->only('adsoyad', 'adres', 'telefon', 'ceptelefonu', 'durum'); 49 | 50 | if ($id > 0) { 51 | $entry = Siparis::where('id', $id)->firstOrFail(); 52 | $entry->update($data); 53 | } 54 | 55 | return redirect() 56 | ->route('yonetim.siparis.duzenle', $entry->id) 57 | ->with('mesaj', 'Güncellendi') 58 | ->with('mesaj_tur', 'success'); 59 | } 60 | 61 | public function sil($id) 62 | { 63 | Siparis::destroy($id); 64 | 65 | return redirect() 66 | ->route('yonetim.siparis') 67 | ->with('mesaj', 'Kayıt silindi') 68 | ->with('mesaj_tur', 'success'); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/Http/Controllers/Yonetim/UrunController.php: -------------------------------------------------------------------------------- 1 | filled('aranan')) { 16 | request()->flash(); 17 | $aranan = request('aranan'); 18 | $list = Urun::where('urun_adi', 'like', "%$aranan%") 19 | ->orWhere('aciklama', 'like', "%$aranan%") 20 | ->orderByDesc('id') 21 | ->paginate(8) 22 | ->appends('aranan', $aranan); 23 | } else { 24 | $list = Urun::orderByDesc('id')->paginate(8); 25 | } 26 | 27 | return view('yonetim.urun.index', compact('list')); 28 | } 29 | 30 | public function form($id = 0) 31 | { 32 | $entry = new Urun; 33 | $urun_kategorileri = []; 34 | if ($id > 0) { 35 | $entry = Urun::find($id); 36 | $urun_kategorileri = $entry->kategoriler()->pluck('kategori_id')->all(); 37 | } 38 | 39 | $kategoriler = Kategori::all(); 40 | 41 | return view('yonetim.urun.form', compact('entry', 'kategoriler', 'urun_kategorileri')); 42 | } 43 | 44 | public function kaydet($id = 0) 45 | { 46 | $data = request()->only('urun_adi', 'slug', 'aciklama', 'fiyati'); 47 | if (!request()->filled('slug')) { 48 | $data['slug'] = str_slug(request('urun_adi')); 49 | request()->merge(['slug' => $data['slug']]); 50 | } 51 | 52 | $this->validate(request(), [ 53 | 'urun_adi' => 'required', 54 | 'fiyati' => 'required', 55 | 'slug' => (request('original_slug') != request('slug') ? 'unique:urun,slug' : '') 56 | ]); 57 | 58 | $data_detay = request()->only('goster_slider', 'goster_gunun_firsati', 'goster_one_cikan', 'goster_cok_satan', 'goster_indirimli'); 59 | 60 | $kategoriler = request('kategoriler'); 61 | 62 | if ($id > 0) { 63 | $entry = Urun::where('id', $id)->firstOrFail(); 64 | $entry->update($data); 65 | $entry->detay()->update($data_detay); 66 | $entry->kategoriler()->sync($kategoriler); 67 | } else { 68 | $entry = Urun::create($data); 69 | $entry->detay()->create($data_detay); 70 | $entry->kategoriler()->attach($kategoriler); 71 | } 72 | 73 | if (request()->hasFile('urun_resmi')) { 74 | $this->validate(request(), [ 75 | 'urun_resmi' => 'image|mimes:jpg,png,jpeg,gif|max:2048' 76 | ]); 77 | 78 | $urun_resmi = request()->file('urun_resmi'); 79 | //$urun_resmi = request()->urun_resmi; 80 | 81 | $dosyaadi = $entry->id . "-" . time() . "." . $urun_resmi->extension(); 82 | //$dosyaadi = $urun_resmi->getClientOriginalName(); 83 | //$dosyaadi = $urun_resmi->hashName(); 84 | 85 | if ($urun_resmi->isValid()) { 86 | File::delete('uploads/urunler/' . $entry->detay->urun_resmi); 87 | 88 | $urun_resmi->move('uploads/urunler', $dosyaadi); 89 | 90 | UrunDetay::updateOrCreate( 91 | ['urun_id' => $entry->id], 92 | ['urun_resmi' => $dosyaadi] 93 | ); 94 | } 95 | } 96 | 97 | return redirect() 98 | ->route('yonetim.urun.duzenle', $entry->id) 99 | ->with('mesaj', ($id > 0 ? 'Güncellendi' : 'Kaydedildi')) 100 | ->with('mesaj_tur', 'success'); 101 | } 102 | 103 | public function sil($id) 104 | { 105 | $urun = Urun::find($id); 106 | 107 | File::delete('uploads/urunler/' . $urun->detay->urun_resmi); 108 | 109 | $urun->kategoriler()->detach(); 110 | //$urun->detay()->delete(); 111 | 112 | $urun->delete(); 113 | 114 | return redirect() 115 | ->route('yonetim.urun') 116 | ->with('mesaj', 'Kayıt silindi') 117 | ->with('mesaj_tur', 'success'); 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 31 | \App\Http\Middleware\EncryptCookies::class, 32 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 33 | \Illuminate\Session\Middleware\StartSession::class, 34 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 35 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 36 | \App\Http\Middleware\VerifyCsrfToken::class, 37 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 38 | ], 39 | 40 | 'api' => [ 41 | 'throttle:60,1', 42 | 'bindings', 43 | ], 44 | ]; 45 | 46 | /** 47 | * The application's route middleware. 48 | * 49 | * These middleware may be assigned to groups or used individually. 50 | * 51 | * @var array 52 | */ 53 | protected $routeMiddleware = [ 54 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 57 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 58 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 59 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 60 | 'yonetim' => \App\Http\Middleware\Yonetim::class 61 | ]; 62 | } 63 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | check() && Auth::guard('yonetim')->user()->yonetici_mi) 20 | { 21 | return $next($request); 22 | } 23 | 24 | return redirect()->route('yonetim.oturumac'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Mail/KullaniciKayitMail.php: -------------------------------------------------------------------------------- 1 | kullanici = $kullanici; 25 | } 26 | 27 | /** 28 | * Build the message. 29 | * 30 | * @return $this 31 | */ 32 | public function build() 33 | { 34 | return $this 35 | ->subject(config('app.name') . ' - Kullanıcı Kaydı') 36 | ->view('mails.kullanici_kayit'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Models/Ayar.php: -------------------------------------------------------------------------------- 1 | belongsToMany('App\Models\Urun', 'kategori_urun'); 22 | } 23 | 24 | public function alt_kategoriler() 25 | { 26 | return $this->hasMany('App\Models\Kategori', 'ust_id', 'id'); 27 | } 28 | 29 | public function ust_kategori() { 30 | return $this->belongsTo('App\Models\Kategori', 'ust_id')->withDefault([ 31 | 'kategori_adi' => 'Ana Kategori' 32 | ]); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Models/Kullanici.php: -------------------------------------------------------------------------------- 1 | sifre; 25 | } 26 | 27 | public function detay() 28 | { 29 | return $this->hasOne('App\Models\KullaniciDetay')->withDefault(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Models/KullaniciDetay.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Models\Kullanici'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Models/Sepet.php: -------------------------------------------------------------------------------- 1 | hasOne('App\Models\Siparis'); 24 | } 25 | 26 | public function sepet_urunler() 27 | { 28 | return $this->hasMany('App\Models\SepetUrun'); 29 | } 30 | 31 | public static function aktif_sepet_id() 32 | { 33 | $aktif_sepet = DB::table('sepet as s') 34 | ->leftJoin('siparis as si', 'si.sepet_id', '=', 's.id') 35 | ->where('s.kullanici_id', auth()->id()) 36 | ->whereRaw('si.id is null') 37 | ->orderByDesc('s.olusturma_tarihi') 38 | ->select('s.id') 39 | ->first(); 40 | 41 | if (!is_null($aktif_sepet)) return $aktif_sepet->id; 42 | } 43 | 44 | public function sepet_urun_adet() 45 | { 46 | return DB::table('sepet_urun') 47 | ->whereRaw('silinme_tarihi is null') 48 | ->where('sepet_id', $this->id) 49 | ->sum('adet'); 50 | } 51 | 52 | public function kullanici() 53 | { 54 | return $this->belongsTo('App\Models\Kullanici'); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/Models/SepetUrun.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Models\Urun'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Models/Siparis.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Models\Sepet'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Models/Urun.php: -------------------------------------------------------------------------------- 1 | belongsToMany('App\Models\Kategori', 'kategori_urun'); 23 | } 24 | 25 | public function detay() 26 | { 27 | return $this->hasOne('App\Models\UrunDetay')->withDefault(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Models/UrunDetay.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Models\Urun'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | addMinutes(10); 28 | $istatistikler = Cache::remember('istatistikler', $bitisZamani, function () { 29 | return [ 30 | 'bekleyen_siparis' => Siparis::where('durum', 'Siparişiniz alındı')->count() 31 | ]; 32 | }); 33 | View::share('istatistikler', $istatistikler);*/ 34 | 35 | View::composer(['yonetim.*'], function($view) { 36 | $bitisZamani = now()->addMinutes(10); 37 | $istatistikler = Cache::remember('istatistikler', $bitisZamani, function () { 38 | return [ 39 | 'bekleyen_siparis' => Siparis::where('durum', 'Siparişiniz alındı')->count(), 40 | 'tamamlanan_siparis' => Siparis::where('durum', 'Sipariş tamamlandı')->count(), 41 | 'toplam_urun' => Urun::count(), 42 | 'toplam_kategori' => Kategori::count(), 43 | 'toplam_kullanici' => Kullanici::count() 44 | ]; 45 | }); 46 | 47 | $view->with('istatistikler', $istatistikler); 48 | }); 49 | 50 | foreach(Ayar::all() as $ayar) { 51 | Config::set('ayar.' . $ayar->anahtar, $ayar->deger); 52 | } 53 | } 54 | 55 | /** 56 | * Register any application services. 57 | * 58 | * @return void 59 | */ 60 | public function register() 61 | { 62 | // 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::middleware('web') 55 | ->namespace($this->namespace) 56 | ->group(base_path('routes/web.php')); 57 | } 58 | 59 | /** 60 | * Define the "api" routes for the application. 61 | * 62 | * These routes are typically stateless. 63 | * 64 | * @return void 65 | */ 66 | protected function mapApiRoutes() 67 | { 68 | Route::prefix('api') 69 | ->middleware('api') 70 | ->namespace($this->namespace) 71 | ->group(base_path('routes/api.php')); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/helpers.php: -------------------------------------------------------------------------------- 1 | where('anahtar', $anahtar)->first()->deger; 14 | } 15 | } -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": ">=7.0.0", 9 | "doctrine/dbal": "^2.6", 10 | "fideloper/proxy": "~4.0", 11 | "gloudemans/shoppingcart": "^2.4", 12 | "laravel/framework": "5.6.*", 13 | "laravel/tinker": "~1.0", 14 | "unisharp/laravel-filemanager": "~1.8" 15 | }, 16 | "require-dev": { 17 | "filp/whoops": "~2.0", 18 | "fzaninotto/faker": "~1.4", 19 | "mockery/mockery": "0.9.*", 20 | "phpunit/phpunit": "~7.0" 21 | }, 22 | "autoload": { 23 | "files": [ 24 | "app/helpers.php" 25 | ], 26 | "classmap": [ 27 | "database/seeds", 28 | "database/factories" 29 | ], 30 | "psr-4": { 31 | "App\\": "app/" 32 | } 33 | }, 34 | "autoload-dev": { 35 | "psr-4": { 36 | "Tests\\": "tests/" 37 | } 38 | }, 39 | "extra": { 40 | "laravel": { 41 | "dont-discover": [ 42 | ] 43 | } 44 | }, 45 | "scripts": { 46 | "post-root-package-install": [ 47 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 48 | ], 49 | "post-create-project-cmd": [ 50 | "@php artisan key:generate" 51 | ], 52 | "post-autoload-dump": [ 53 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 54 | "@php artisan package:discover" 55 | ] 56 | }, 57 | "config": { 58 | "preferred-install": "dist", 59 | "sort-packages": true, 60 | "optimize-autoloader": true 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'yonetim' => [ 45 | 'driver' => 'session', 46 | 'provider' => 'users', 47 | ], 48 | 49 | 'api' => [ 50 | 'driver' => 'token', 51 | 'provider' => 'users', 52 | ], 53 | ], 54 | 55 | /* 56 | |-------------------------------------------------------------------------- 57 | | User Providers 58 | |-------------------------------------------------------------------------- 59 | | 60 | | All authentication drivers have a user provider. This defines how the 61 | | users are actually retrieved out of your database or other storage 62 | | mechanisms used by this application to persist your user's data. 63 | | 64 | | If you have multiple user tables or models you may configure multiple 65 | | sources which represent each model / table. These sources may then 66 | | be assigned to any extra authentication guards you have defined. 67 | | 68 | | Supported: "database", "eloquent" 69 | | 70 | */ 71 | 72 | 'providers' => [ 73 | 'users' => [ 74 | 'driver' => 'eloquent', 75 | 'model' => App\Models\Kullanici::class, 76 | ], 77 | 78 | // 'users' => [ 79 | // 'driver' => 'database', 80 | // 'table' => 'users', 81 | // ], 82 | ], 83 | 84 | /* 85 | |-------------------------------------------------------------------------- 86 | | Resetting Passwords 87 | |-------------------------------------------------------------------------- 88 | | 89 | | You may specify multiple password reset configurations if you have more 90 | | than one user table or model in the application and you want to have 91 | | separate password reset settings based on the specific user types. 92 | | 93 | | The expire time is the number of minutes that the reset token should be 94 | | considered valid. This security feature keeps tokens short-lived so 95 | | they have less time to be guessed. You may change this as needed. 96 | | 97 | */ 98 | 99 | 'passwords' => [ 100 | 'users' => [ 101 | 'provider' => 'users', 102 | 'table' => 'password_resets', 103 | 'expire' => 60, 104 | ], 105 | ], 106 | 107 | ]; 108 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | 'null' => [ 53 | 'driver' => 'null', 54 | ], 55 | 56 | ], 57 | 58 | ]; 59 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache/data'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 55 | 'sasl' => [ 56 | env('MEMCACHED_USERNAME'), 57 | env('MEMCACHED_PASSWORD'), 58 | ], 59 | 'options' => [ 60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 61 | ], 62 | 'servers' => [ 63 | [ 64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 65 | 'port' => env('MEMCACHED_PORT', 11211), 66 | 'weight' => 100, 67 | ], 68 | ], 69 | ], 70 | 71 | 'redis' => [ 72 | 'driver' => 'redis', 73 | 'connection' => 'default', 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Cache Key Prefix 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When utilizing a RAM based store such as APC or Memcached, there might 84 | | be other applications utilizing the same cache. So, we'll specify a 85 | | value to get prefixed to all our keys so we can avoid collisions. 86 | | 87 | */ 88 | 89 | 'prefix' => 'laravel', 90 | 91 | ]; 92 | -------------------------------------------------------------------------------- /config/cart.php: -------------------------------------------------------------------------------- 1 | 18, 16 | 17 | /* 18 | |-------------------------------------------------------------------------- 19 | | Shoppingcart database settings 20 | |-------------------------------------------------------------------------- 21 | | 22 | | Here you can set the connection that the shoppingcart should use when 23 | | storing and restoring a cart. 24 | | 25 | */ 26 | 27 | 'database' => [ 28 | 29 | 'connection' => null, 30 | 31 | 'table' => 'shoppingcart', 32 | 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Destroy the cart on user logout 38 | |-------------------------------------------------------------------------- 39 | | 40 | | When this option is set to 'true' the cart will automatically 41 | | destroy all cart instances when the user logs out. 42 | | 43 | */ 44 | 45 | 'destroy_on_logout' => false, 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Default number format 50 | |-------------------------------------------------------------------------- 51 | | 52 | | This defaults will be used for the formated numbers if you don't 53 | | set them in the method call. 54 | | 55 | */ 56 | 57 | 'format' => [ 58 | 59 | 'decimals' => 2, 60 | 61 | 'decimal_point' => '.', 62 | 63 | 'thousand_seperator' => ',' 64 | 65 | ], 66 | 67 | ]; -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Database Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here are each of the database connections setup for your application. 24 | | Of course, examples of configuring each database platform that is 25 | | supported by Laravel is shown below to make development simple. 26 | | 27 | | 28 | | All database work in Laravel is done through the PHP PDO facilities 29 | | so make sure you have the driver for your particular database of 30 | | choice installed on your machine before you begin development. 31 | | 32 | */ 33 | 34 | 'connections' => [ 35 | 36 | 'sqlite' => [ 37 | 'driver' => 'sqlite', 38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 39 | 'prefix' => '', 40 | ], 41 | 42 | 'mysql' => [ 43 | 'driver' => 'mysql', 44 | 'host' => env('DB_HOST', '127.0.0.1'), 45 | 'port' => env('DB_PORT', '3306'), 46 | 'database' => env('DB_DATABASE', 'forge'), 47 | 'username' => env('DB_USERNAME', 'forge'), 48 | 'password' => env('DB_PASSWORD', ''), 49 | 'unix_socket' => env('DB_SOCKET', ''), 50 | 'charset' => 'utf8mb4', 51 | 'collation' => 'utf8mb4_unicode_ci', 52 | 'prefix' => '', 53 | 'strict' => true, 54 | 'engine' => null, 55 | ], 56 | 57 | 'pgsql' => [ 58 | 'driver' => 'pgsql', 59 | 'host' => env('DB_HOST', '127.0.0.1'), 60 | 'port' => env('DB_PORT', '5432'), 61 | 'database' => env('DB_DATABASE', 'forge'), 62 | 'username' => env('DB_USERNAME', 'forge'), 63 | 'password' => env('DB_PASSWORD', ''), 64 | 'charset' => 'utf8', 65 | 'prefix' => '', 66 | 'schema' => 'public', 67 | 'sslmode' => 'prefer', 68 | ], 69 | 70 | 'sqlsrv' => [ 71 | 'driver' => 'sqlsrv', 72 | 'host' => env('DB_HOST', 'localhost'), 73 | 'port' => env('DB_PORT', '1433'), 74 | 'database' => env('DB_DATABASE', 'forge'), 75 | 'username' => env('DB_USERNAME', 'forge'), 76 | 'password' => env('DB_PASSWORD', ''), 77 | 'charset' => 'utf8', 78 | 'prefix' => '', 79 | ], 80 | 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Migration Repository Table 86 | |-------------------------------------------------------------------------- 87 | | 88 | | This table keeps track of all the migrations that have already run for 89 | | your application. Using this information, we can determine which of 90 | | the migrations on disk haven't actually been run in the database. 91 | | 92 | */ 93 | 94 | 'migrations' => 'migrations', 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Redis Databases 99 | |-------------------------------------------------------------------------- 100 | | 101 | | Redis is an open source, fast, and advanced key-value store that also 102 | | provides a richer set of commands than a typical key-value systems 103 | | such as APC or Memcached. Laravel makes it easy to dig right in. 104 | | 105 | */ 106 | 107 | 'redis' => [ 108 | 109 | 'client' => 'predis', 110 | 111 | 'default' => [ 112 | 'host' => env('REDIS_HOST', '127.0.0.1'), 113 | 'password' => env('REDIS_PASSWORD', null), 114 | 'port' => env('REDIS_PORT', 6379), 115 | 'database' => 0, 116 | ], 117 | 118 | ], 119 | 120 | ]; 121 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "s3", "rackspace" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_KEY'), 61 | 'secret' => env('AWS_SECRET'), 62 | 'region' => env('AWS_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | ], 65 | 66 | ], 67 | 68 | ]; 69 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 18 | ]; 19 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Log Channels 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the log channels for your application. Out of 24 | | the box, Laravel uses the Monolog PHP logging library. This gives 25 | | you a variety of powerful log handlers / formatters to utilize. 26 | | 27 | | Available Drivers: "single", "daily", "slack", "syslog", 28 | | "errorlog", "custom", "stack" 29 | | 30 | */ 31 | 32 | 'channels' => [ 33 | 'stack' => [ 34 | 'driver' => 'stack', 35 | 'channels' => ['single'], 36 | ], 37 | 38 | 'single' => [ 39 | 'driver' => 'single', 40 | 'path' => storage_path('logs/laravel.log'), 41 | 'level' => 'debug', 42 | ], 43 | 44 | 'daily' => [ 45 | 'driver' => 'daily', 46 | 'path' => storage_path('logs/laravel.log'), 47 | 'level' => 'debug', 48 | 'days' => 7, 49 | ], 50 | 51 | 'slack' => [ 52 | 'driver' => 'slack', 53 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 54 | 'username' => 'Laravel Log', 55 | 'emoji' => ':boom:', 56 | 'level' => 'critical', 57 | ], 58 | 59 | 'syslog' => [ 60 | 'driver' => 'syslog', 61 | 'level' => 'debug', 62 | ], 63 | 64 | 'errorlog' => [ 65 | 'driver' => 'errorlog', 66 | 'level' => 'debug', 67 | ], 68 | ], 69 | 70 | ]; 71 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => [ 59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 60 | 'name' => env('MAIL_FROM_NAME', 'Example'), 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | E-Mail Encryption Protocol 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Here you may specify the encryption protocol that should be used when 69 | | the application send e-mail messages. A sensible default using the 70 | | transport layer security protocol should provide great security. 71 | | 72 | */ 73 | 74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | SMTP Server Username 79 | |-------------------------------------------------------------------------- 80 | | 81 | | If your SMTP server requires a username for authentication, you should 82 | | set it here. This will get used to authenticate with your server on 83 | | connection. You may also set the "password" value below this one. 84 | | 85 | */ 86 | 87 | 'username' => env('MAIL_USERNAME'), 88 | 89 | 'password' => env('MAIL_PASSWORD'), 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Sendmail System Path 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When using the "sendmail" driver to send e-mails, we will need to know 97 | | the path to where Sendmail lives on this server. A default path has 98 | | been provided here, which will work well on most of your systems. 99 | | 100 | */ 101 | 102 | 'sendmail' => '/usr/sbin/sendmail -bs', 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Markdown Mail Settings 107 | |-------------------------------------------------------------------------- 108 | | 109 | | If you are using Markdown based email rendering, you may configure your 110 | | theme and component paths here, allowing you to customize the design 111 | | of the emails. Or, you may simply stick with the Laravel defaults! 112 | | 113 | */ 114 | 115 | 'markdown' => [ 116 | 'theme' => 'default', 117 | 118 | 'paths' => [ 119 | resource_path('views/vendor/mail'), 120 | ], 121 | ], 122 | 123 | ]; 124 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\Models\Kullanici::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(App\Models\Kullanici::class, function (Faker $faker) { 17 | static $password; 18 | 19 | return [ 20 | 'name' => $faker->name, 21 | 'email' => $faker->unique()->safeEmail, 22 | 'password' => $password ?: $password = bcrypt('secret'), 23 | 'remember_token' => str_random(10), 24 | ]; 25 | }); 26 | -------------------------------------------------------------------------------- /database/migrations/2017_10_17_183408_create_kategori_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('ust_id')->nullable(); 19 | $table->string('kategori_adi', 30); 20 | $table->string('slug', 40); 21 | $table->timestamp('olusturma_tarihi')->default(DB::raw('CURRENT_TIMESTAMP')); 22 | $table->timestamp('guncelleme_tarihi')->default(DB::raw('CURRENT_TIMESTAMP on UPDATE CURRENT_TIMESTAMP')); 23 | //$table->softDeletes(); 24 | $table->timestamp('silinme_tarihi')->nullable(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('kategori'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2017_10_29_114953_create_urun_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('slug', 160); 19 | $table->string('urun_adi', 150); 20 | $table->text('aciklama')->nullable(); 21 | $table->decimal('fiyati', 10, 3); 22 | $table->timestamp('olusturma_tarihi')->default(DB::raw('CURRENT_TIMESTAMP')); 23 | $table->timestamp('guncelleme_tarihi')->default(DB::raw('CURRENT_TIMESTAMP on UPDATE CURRENT_TIMESTAMP')); 24 | $table->timestamp('silinme_tarihi')->nullable(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('urun'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2017_11_02_170735_create_kategori_urun_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('kategori_id')->unsigned(); 19 | $table->integer('urun_id')->unsigned(); 20 | 21 | $table->foreign('kategori_id')->references('id')->on('kategori')->onDelete('cascade'); 22 | $table->foreign('urun_id')->references('id')->on('urun')->onDelete('cascade'); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('kategori_urun'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2017_11_05_101237_create_urun_detay_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('urun_id')->unsigned()->unique(); 19 | $table->boolean('goster_slider')->default(0); 20 | $table->boolean('goster_gunun_firsati')->default(0); 21 | $table->boolean('goster_one_cikan')->default(0); 22 | $table->boolean('goster_cok_satan')->default(0); 23 | $table->boolean('goster_indirimli')->default(0); 24 | $table->string('urun_resmi', 50); 25 | 26 | //$table->unique('urun_id'); 27 | 28 | $table->foreign('urun_id')->references('id')->on('urun')->onDelete('cascade'); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('urun_detay'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2017_11_10_191439_create_kullanici_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('adsoyad', 60); 19 | $table->string('email', 150)->unique(); 20 | $table->string('sifre', 60); 21 | $table->string('aktivasyon_anahtari', 60)->nullable(); 22 | $table->boolean('aktif_mi')->default(0); 23 | $table->boolean('yonetici_mi')->default(0); 24 | $table->rememberToken(); 25 | 26 | $table->timestamp('olusturma_tarihi')->default(DB::raw('CURRENT_TIMESTAMP')); 27 | $table->timestamp('guncelleme_tarihi')->default(DB::raw('CURRENT_TIMESTAMP on UPDATE CURRENT_TIMESTAMP')); 28 | $table->timestamp('silinme_tarihi')->nullable(); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('kullanici'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2017_11_17_200454_create_sepet_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('kullanici_id')->unsigned(); 19 | 20 | $table->timestamp('olusturma_tarihi')->default(DB::raw('CURRENT_TIMESTAMP')); 21 | $table->timestamp('guncelleme_tarihi')->default(DB::raw('CURRENT_TIMESTAMP on UPDATE CURRENT_TIMESTAMP')); 22 | $table->timestamp('silinme_tarihi')->nullable(); 23 | 24 | $table->foreign('kullanici_id')->references('id')->on('kullanici')->onDelete('cascade'); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('sepet'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2017_11_19_184606_create_sepet_urun_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('sepet_id')->unsigned(); 19 | $table->integer('urun_id')->unsigned(); 20 | $table->integer('adet'); 21 | $table->decimal('fiyati', 5, 2); 22 | $table->string('durum', 30); 23 | 24 | $table->timestamp('olusturma_tarihi')->default(DB::raw('CURRENT_TIMESTAMP')); 25 | $table->timestamp('guncelleme_tarihi')->default(DB::raw('CURRENT_TIMESTAMP on UPDATE CURRENT_TIMESTAMP')); 26 | $table->timestamp('silinme_tarihi')->nullable(); 27 | 28 | $table->foreign('sepet_id')->references('id')->on('sepet')->onDelete('cascade'); 29 | $table->foreign('urun_id')->references('id')->on('urun')->onDelete('cascade'); 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('sepet_urun'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2017_11_26_131901_create_siparis_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('sepet_id')->unsigned(); 19 | $table->decimal('siparis_tutari', 10, 4); 20 | $table->string('durum', 30)->nullable(); 21 | 22 | $table->string('adsoyad', 50)->nullable(); 23 | $table->string('adres', 200)->nullable(); 24 | $table->string('telefon', 15)->nullable(); 25 | $table->string('ceptelefonu', 15)->nullable(); 26 | $table->string('banka', 20)->nullable(); 27 | $table->integer('taksit_sayisi')->nullable(); 28 | 29 | $table->timestamp('olusturma_tarihi')->default(DB::raw('CURRENT_TIMESTAMP')); 30 | $table->timestamp('guncelleme_tarihi')->default(DB::raw('CURRENT_TIMESTAMP on UPDATE CURRENT_TIMESTAMP')); 31 | $table->timestamp('silinme_tarihi')->nullable(); 32 | 33 | $table->unique('sepet_id'); 34 | $table->foreign('sepet_id')->references('id')->on('sepet')->onDelete('cascade'); 35 | }); 36 | } 37 | 38 | /** 39 | * Reverse the migrations. 40 | * 41 | * @return void 42 | */ 43 | public function down() 44 | { 45 | Schema::dropIfExists('siparis'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /database/migrations/2017_11_26_133711_create_kullanici_detay_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->integer('kullanici_id')->unsigned(); 19 | $table->string('adres', 200)->nullable(); 20 | $table->string('telefon', 15)->nullable(); 21 | $table->string('ceptelefonu', 15)->nullable(); 22 | 23 | $table->foreign('kullanici_id')->references('id')->on('kullanici')->onDelete('cascade'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('kullanici_detay'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2018_06_19_194441_create_ayar_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('anahtar'); 19 | $table->text('deger')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('ayar'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(KategoriTableSeeder::class); 15 | $this->call(UrunTableSeeder::class); 16 | $this->call(KullaniciTableSeeder::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/seeds/KategoriTableSeeder.php: -------------------------------------------------------------------------------- 1 | truncate(); 16 | 17 | $id = DB::table('kategori')->insertGetId(['kategori_adi'=>'Elektronik', 'slug'=>'elektronik']); 18 | DB::table('kategori')->insert(['kategori_adi'=>'Bilgisayar/Tablet', 'slug'=>'bilgisayar-tablet', 'ust_id'=>$id]); 19 | DB::table("kategori")->insert(['kategori_adi' => 'Telefon', 'slug' => 'telefon', 'ust_id'=> $id]); 20 | DB::table("kategori")->insert(['kategori_adi' => 'TV ve Ses Sistemleri', 'slug' => 'tv-ses-sistemleri', 'ust_id'=> $id]); 21 | DB::table("kategori")->insert(['kategori_adi' => 'Kamera', 'slug' => 'kamera', 'ust_id'=> $id]); 22 | 23 | $id = DB::table("kategori")->insertGetId(['kategori_adi' => 'Kitap', 'slug' => 'kitap']); 24 | DB::table("kategori")->insert(['kategori_adi' => 'Edebiyat', 'slug' => 'edebiyat', 'ust_id' => $id]); 25 | DB::table("kategori")->insert(['kategori_adi' => 'Çocuk', 'slug' => 'cocuk', 'ust_id' => $id]); 26 | DB::table("kategori")->insert(['kategori_adi' => 'Bilgisayar', 'slug' => 'bilgisayar', 'ust_id' => $id]); 27 | DB::table("kategori")->insert(['kategori_adi' => 'Sınavlara Hazırlık', 'slug' => 'sinavlara-hazirlik', 'ust_id' => $id]); 28 | 29 | DB::table("kategori")->insert(['kategori_adi' => 'Dergi', 'slug' => 'dergi']); 30 | DB::table("kategori")->insert(['kategori_adi' => 'Mobilya', 'slug' => 'mobilya']); 31 | DB::table("kategori")->insert(['kategori_adi' => 'Dekorasyon', 'slug' => 'dekorasyon']); 32 | DB::table("kategori")->insert(['kategori_adi' => 'Kozmetik', 'slug' => 'kozmetik']); 33 | DB::table("kategori")->insert(['kategori_adi' => 'Kişisel Bakım', 'slug' => 'kisisel-bakim']); 34 | DB::table("kategori")->insert(['kategori_adi' => 'Giyim ve Moda', 'slug' => 'giyim-moda']); 35 | DB::table("kategori")->insert(['kategori_adi' => 'Anne ve Çocuk', 'slug' => 'anne-cocuk']); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/seeds/KullaniciTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'Cem Gündüzoğlu', 23 | 'email' => 'cem@eticaret.test', 24 | 'sifre' => bcrypt('123456'), 25 | 'aktif_mi' => 1, 26 | 'yonetici_mi' => 1 27 | ]); 28 | $kullanici_yonetici->detay()->create([ 29 | 'adres' => 'Ankara', 30 | 'telefon' => '(312) 444 55 66', 31 | 'ceptelefonu' => '(555) 444 55 66' 32 | ]); 33 | 34 | for ($i = 0; $i < 50; $i++) { 35 | $kullanici_musteri = Kullanici::create([ 36 | 'adsoyad' => $faker->name, 37 | 'email' => $faker->unique()->safeEmail, 38 | 'sifre' => bcrypt('123456'), 39 | 'aktif_mi' => 1, 40 | 'yonetici_mi' => 0 41 | ]); 42 | 43 | $kullanici_musteri->detay()->create([ 44 | 'adres' => $faker->address, 45 | 'telefon' => $faker->e164PhoneNumber, 46 | 'ceptelefonu' => $faker->e164PhoneNumber 47 | ]); 48 | } 49 | 50 | DB::statement('SET FOREIGN_KEY_CHECKS=1;'); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /database/seeds/UrunTableSeeder.php: -------------------------------------------------------------------------------- 1 | streetName; 23 | $urun = Urun::create([ 24 | 'urun_adi' => $urun_adi, 25 | 'slug' => str_slug($urun_adi), 26 | 'aciklama' => $faker->paragraph(20), 27 | 'fiyati' => $faker->randomFloat(3, 1, 20) 28 | ]); 29 | 30 | $detay = $urun->detay()->create([ 31 | 'goster_slider'=>rand(0,1), 32 | 'goster_gunun_firsati'=>rand(0,1), 33 | 'goster_one_cikan'=>rand(0,1), 34 | 'goster_cok_satan'=>rand(0,1), 35 | 'goster_indirimli'=>rand(0,1) 36 | ]); 37 | } 38 | 39 | DB::table('kategori_urun')->truncate(); 40 | $kategoriler = Kategori::all(); 41 | foreach ($kategoriler as $kategori) { 42 | $urunler = Urun::pluck('id')->random(10)->all(); 43 | $kategori->urunler()->attach($urunler); 44 | } 45 | 46 | DB::statement('SET FOREIGN_KEY_CHECKS=1;'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.16.2", 14 | "bootstrap-sass": "^3.3.7", 15 | "cross-env": "^5.0.1", 16 | "jquery": "^3.1.1", 17 | "laravel-mix": "^1.0", 18 | "lodash": "^4.17.4" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Feature 14 | 15 | 16 | 17 | ./tests/Unit 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteCond %{REQUEST_URI} (.+)/$ 11 | RewriteRule ^ %1 [L,R=301] 12 | 13 | # Handle Front Controller... 14 | RewriteCond %{REQUEST_FILENAME} !-d 15 | RewriteCond %{REQUEST_FILENAME} !-f 16 | RewriteRule ^ index.php [L] 17 | 18 | # Handle Authorization Header 19 | RewriteCond %{HTTP:Authorization} . 20 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemg/laravel-eticaret/9e639a3e9af05b8bbd7033aad23892e7da7c900b/public/favicon.ico -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemg/laravel-eticaret/9e639a3e9af05b8bbd7033aad23892e7da7c900b/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemg/laravel-eticaret/9e639a3e9af05b8bbd7033aad23892e7da7c900b/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemg/laravel-eticaret/9e639a3e9af05b8bbd7033aad23892e7da7c900b/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemg/laravel-eticaret/9e639a3e9af05b8bbd7033aad23892e7da7c900b/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemg/laravel-eticaret/9e639a3e9af05b8bbd7033aad23892e7da7c900b/public/img/logo.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css", 4 | "/css/admin.css": "/css/admin.css", 5 | "/css/login.css": "/css/login.css", 6 | "/js/admin-app.js": "/js/admin-app.js" 7 | } -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/vendor/laravel-filemanager/css/cropper.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Cropper v0.9.1 3 | * https://github.com/fengyuanchen/cropper 4 | * 5 | * Copyright (c) 2014-2015 Fengyuan Chen and contributors 6 | * Released under the MIT license 7 | * 8 | * Date: 2015-03-21T04:58:27.265Z 9 | */.cropper-container{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.cropper-container img{display:block;width:100%;min-width:0!important;max-width:none!important;height:100%;min-height:0!important;max-height:none!important;image-orientation:0deg!important}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal{position:absolute;top:0;right:0;bottom:0;left:0}.cropper-drag-box{background-color:#fff;filter:alpha(opacity=0);opacity:0}.cropper-modal{background-color:#000;filter:alpha(opacity=50);opacity:.5}.cropper-view-box{display:block;width:100%;height:100%;overflow:hidden;outline:#69f solid 1px;outline-color:rgba(102,153,255,.75)}.cropper-dashed{position:absolute;display:block;filter:alpha(opacity=50);border:0 dashed #fff;opacity:.5}.cropper-dashed.dashed-h{top:33.33333333%;left:0;width:100%;height:33.33333333%;border-top-width:1px;border-bottom-width:1px}.cropper-dashed.dashed-v{top:0;left:33.33333333%;width:33.33333333%;height:100%;border-right-width:1px;border-left-width:1px}.cropper-face,.cropper-line,.cropper-point{position:absolute;display:block;width:100%;height:100%;filter:alpha(opacity=10);opacity:.1}.cropper-face{top:0;left:0;cursor:move;background-color:#fff}.cropper-line{background-color:#69f}.cropper-line.line-e{top:0;right:-3px;width:5px;cursor:e-resize}.cropper-line.line-n{top:-3px;left:0;height:5px;cursor:n-resize}.cropper-line.line-w{top:0;left:-3px;width:5px;cursor:w-resize}.cropper-line.line-s{bottom:-3px;left:0;height:5px;cursor:s-resize}.cropper-point{width:5px;height:5px;background-color:#69f;filter:alpha(opacity=75);opacity:.75}.cropper-point.point-e{top:50%;right:-3px;margin-top:-3px;cursor:e-resize}.cropper-point.point-n{top:-3px;left:50%;margin-left:-3px;cursor:n-resize}.cropper-point.point-w{top:50%;left:-3px;margin-top:-3px;cursor:w-resize}.cropper-point.point-s{bottom:-3px;left:50%;margin-left:-3px;cursor:s-resize}.cropper-point.point-ne{top:-3px;right:-3px;cursor:ne-resize}.cropper-point.point-nw{top:-3px;left:-3px;cursor:nw-resize}.cropper-point.point-sw{bottom:-3px;left:-3px;cursor:sw-resize}.cropper-point.point-se{right:-3px;bottom:-3px;width:20px;height:20px;cursor:se-resize;filter:alpha(opacity=100);opacity:1}.cropper-point.point-se:before{position:absolute;right:-50%;bottom:-50%;display:block;width:200%;height:200%;content:" ";background-color:#69f;filter:alpha(opacity=0);opacity:0}@media (min-width:768px){.cropper-point.point-se{width:15px;height:15px}}@media (min-width:992px){.cropper-point.point-se{width:10px;height:10px}}@media (min-width:1200px){.cropper-point.point-se{width:5px;height:5px;filter:alpha(opacity=75);opacity:.75}}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-invisible{filter:alpha(opacity=0);opacity:0}.cropper-hide{position:fixed;top:0;left:0;z-index:-1;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;filter:alpha(opacity=0);opacity:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-canvas,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed} -------------------------------------------------------------------------------- /public/vendor/laravel-filemanager/css/lfm.css: -------------------------------------------------------------------------------- 1 | @media screen and (max-width: 768px) { 2 | #main { 3 | padding: 0px; 4 | } 5 | #nav { 6 | margin-bottom: -1px; 7 | } 8 | #content > .row { 9 | margin: 0px; 10 | } 11 | } 12 | 13 | @media screen and (min-width: 768px) { 14 | #main { 15 | border-left: 1px solid silver; 16 | } 17 | } 18 | 19 | #wrapper { 20 | padding: 0px; 21 | } 22 | 23 | #wrapper > .panel { 24 | border-radius: 0; 25 | } 26 | 27 | #wrapper > .panel > .panel-heading { 28 | border-radius: 0; 29 | } 30 | 31 | #wrapper > .panel > .panel-heading > .panel-title { 32 | padding: 10px 0; 33 | } 34 | 35 | #wrapper > .row { 36 | margin: 0px; 37 | } 38 | 39 | #fab a:hover, #fab a:focus{ 40 | color: white; 41 | } 42 | 43 | .item_name { 44 | width: 120px; 45 | overflow:hidden; 46 | white-space:nowrap; 47 | text-overflow: ellipsis; 48 | } 49 | 50 | .clickable { 51 | cursor: pointer; 52 | } 53 | 54 | .img-preview { 55 | background-color: #f7f7f7; 56 | overflow: hidden; 57 | width: 100%; 58 | text-align: center; 59 | height: 200px; 60 | } 61 | 62 | .hidden { 63 | display: none; 64 | } 65 | 66 | .square { 67 | width: 100%; 68 | padding-bottom: 100%; 69 | position: relative; 70 | border: 1px solid rgb(221, 221, 221); 71 | border-radius: 3px; 72 | // max-width: 210px; 73 | max-height: 210px; 74 | } 75 | .visible-xs .square { 76 | width: 60px; 77 | } 78 | .square > img { 79 | padding: 5px; 80 | position: absolute; 81 | max-width: 100%; 82 | max-height: 100%; 83 | margin: 0 auto; 84 | display: inline-block; 85 | vertical-align: middle; 86 | } 87 | .square > i { 88 | font-size: 80px; 89 | padding: 5px; 90 | position: absolute; 91 | top: calc(50% - 40px); 92 | left: calc(50% - 40px); 93 | } 94 | .visible-xs .square > i { 95 | font-size: 50px; 96 | padding: 0px auto; 97 | padding-top: 5px; 98 | top: calc(50% - 25px); 99 | left: calc(50% - 25px); 100 | } 101 | 102 | .caption { 103 | margin-top: 10px; 104 | margin-bottom: 20px; 105 | } 106 | .caption > .btn-group { 107 | width: 100%; 108 | } 109 | .caption > .btn-group > .item_name { 110 | width: calc(100% - 25px); 111 | } 112 | .caption > .btn-group > .dropdown-toggle { 113 | width: 25px; 114 | } 115 | 116 | #lfm-loader{ 117 | display: none; 118 | position: fixed; 119 | top: 0; 120 | left: 0; 121 | width: 100%; 122 | height: 100%; 123 | background: gray; 124 | opacity: 0.7; 125 | z-index: 9999; 126 | text-align: center; 127 | } 128 | #lfm-loader:before { 129 | content: ""; 130 | display: inline-block; 131 | vertical-align: middle; 132 | height: 100%; 133 | } 134 | #lfm-loader img{ 135 | width: 100px; 136 | margin: 0 auto; 137 | display: inline-block; 138 | vertical-align: middle; 139 | } 140 | 141 | .table-list-view{ 142 | margin-bottom: 120px; 143 | } 144 | .table-list-view .actions{ 145 | text-align: right; 146 | } 147 | .table-list-view .actions a:hover{ 148 | text-decoration: none; 149 | } -------------------------------------------------------------------------------- /public/vendor/laravel-filemanager/img/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cemg/laravel-eticaret/9e639a3e9af05b8bbd7033aad23892e7da7c900b/public/vendor/laravel-filemanager/img/folder.png -------------------------------------------------------------------------------- /public/vendor/laravel-filemanager/img/loader.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 12 | 13 | 14 | 18 | 22 | 23 | 24 | 28 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /public/vendor/laravel-filemanager/js/lfm.js: -------------------------------------------------------------------------------- 1 | (function( $ ){ 2 | 3 | $.fn.filemanager = function(type, options) { 4 | type = type || 'file'; 5 | 6 | this.on('click', function(e) { 7 | var route_prefix = (options && options.prefix) ? options.prefix : '/laravel-filemanager'; 8 | localStorage.setItem('target_input', $(this).data('input')); 9 | localStorage.setItem('target_preview', $(this).data('preview')); 10 | window.open(route_prefix + '?type=' + type, 'FileManager', 'width=900,height=600'); 11 | window.SetUrl = function (url, file_path) { 12 | //set the value of the desired input to image url 13 | var target_input = $('#' + localStorage.getItem('target_input')); 14 | target_input.val(file_path).trigger('change'); 15 | 16 | //set or change the preview image src 17 | var target_preview = $('#' + localStorage.getItem('target_preview')); 18 | target_preview.attr('src', url).trigger('change'); 19 | }; 20 | return false; 21 | }); 22 | } 23 | 24 | })(jQuery); 25 | -------------------------------------------------------------------------------- /public/vendor/laravel-filemanager/js/mfb.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Material floating button 3 | * By: Nobita 4 | * Repo and docs: https://github.com/nobitagit/material-floating-button 5 | * 6 | * License: MIT 7 | */ 8 | 9 | // build script hook - don't remove 10 | ;(function ( window, document, undefined ) { 11 | 12 | 13 | 'use strict'; 14 | 15 | /** 16 | * Some defaults 17 | */ 18 | var clickOpt = 'click', 19 | hoverOpt = 'hover', 20 | toggleMethod = 'data-mfb-toggle', 21 | menuState = 'data-mfb-state', 22 | isOpen = 'open', 23 | isClosed = 'closed', 24 | mainButtonClass = 'mfb-component__button--main'; 25 | 26 | /** 27 | * Internal references 28 | */ 29 | var elemsToClick, 30 | elemsToHover, 31 | mainButton, 32 | target, 33 | currentState; 34 | 35 | /** 36 | * For every menu we need to get the main button and attach the appropriate evt. 37 | */ 38 | function attachEvt( elems, evt ){ 39 | for( var i = 0, len = elems.length; i < len; i++ ){ 40 | mainButton = elems[i].querySelector('.' + mainButtonClass); 41 | mainButton.addEventListener( evt , toggleButton, false); 42 | } 43 | } 44 | 45 | /** 46 | * Remove the hover option, set a click toggle and a default, 47 | * initial state of 'closed' to menu that's been targeted. 48 | */ 49 | function replaceAttrs( elems ){ 50 | for( var i = 0, len = elems.length; i < len; i++ ){ 51 | elems[i].setAttribute( toggleMethod, clickOpt ); 52 | elems[i].setAttribute( menuState, isClosed ); 53 | } 54 | } 55 | 56 | function getElemsByToggleMethod( selector ){ 57 | return document.querySelectorAll('[' + toggleMethod + '="' + selector + '"]'); 58 | } 59 | 60 | /** 61 | * The open/close action is performed by toggling an attribute 62 | * on the menu main element. 63 | * 64 | * First, check if the target is the menu itself. If it's a child 65 | * keep walking up the tree until we found the main element 66 | * where we can toggle the state. 67 | */ 68 | function toggleButton( evt ){ 69 | 70 | target = evt.target; 71 | while ( target && !target.getAttribute( toggleMethod ) ){ 72 | target = target.parentNode; 73 | if(!target) { return; } 74 | } 75 | 76 | currentState = target.getAttribute( menuState ) === isOpen ? isClosed : isOpen; 77 | 78 | target.setAttribute(menuState, currentState); 79 | 80 | } 81 | 82 | /** 83 | * On touch enabled devices we assume that no hover state is possible. 84 | * So, we get the menu with hover action configured and we set it up 85 | * in order to make it usable with tap/click. 86 | **/ 87 | if ( window.Modernizr && Modernizr.touch ){ 88 | elemsToHover = getElemsByToggleMethod( hoverOpt ); 89 | replaceAttrs( elemsToHover ); 90 | } 91 | 92 | elemsToClick = getElemsByToggleMethod( clickOpt ); 93 | 94 | attachEvt( elemsToClick, 'click' ); 95 | 96 | // build script hook - don't remove 97 | })( window, document ); 98 | 99 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | ## Laravel ile Sıfırdan Eticaret Projesi 4 | 5 | Bu proje Udemy üzerinde hazırlamış olduğum eğitime ait kaynak kodları içermektedir. 6 | 7 | ## Kurulum 8 | - Kodları bilgisayarınıza indirin veya klonlayın. 9 | - Konsol ekranında `composer install` komutunu çalıştırın. 10 | - .env.example dosyasının adını .env olarak değiştirin. 11 | - .env dosyası içerisinde yer alan `DB_` parametrelerini kendinize göre ayarlayın. 12 | - Konsol ekranında `php artisan key:generate` komutunu çalıştırın. 13 | - Projeyi çalıştırmak için `php artisan serve` komutunu çalıştırın. 14 | 15 | ## Bölümler 16 | 1. Giriş 17 | 2. Temel Yapılar ve Proje Şablonu 18 | 3. Veritabanı Yapıları 19 | 4. Kategori Yapısı 20 | 5. Ürün Yapısı 21 | 6. Kullanıcı Yapısı 22 | 7. Sepet Yapısı 23 | 8. Sipariş ve Ödeme Yapısı 24 | 9. Yönetici Sayfaları 25 | 10. Kullanıcı Yönetimi 26 | 11. Kategori Yönetimi 27 | 12. Ürün Yönetimi 28 | 29 | ## Bağlantılar 30 | - [Udemy İndirimli Kayıt Sayfası](https://link.uzaktankurs.com/LARAVEL_ETICARET) 31 | 32 | ## Katkıda Bulunma 33 | 34 | Bu proje kurs kapsamında oluşturulmuştur. Kurs içeriği dışında isterseniz projemize katkıda bulunabilirsiniz. 35 | 36 | ## Lisans 37 | 38 | Project files are open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). 39 | 40 | The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). 41 | -------------------------------------------------------------------------------- /resources/assets/js/admin-app.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $('[data-toggle="tooltip"]').tooltip(); 3 | 4 | setTimeout(function () { 5 | $('.alert').slideUp(500); 6 | }, 5000); 7 | }); -------------------------------------------------------------------------------- /resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * First, we will load all of this project's Javascript utilities and other 3 | * dependencies. Then, we will be ready to develop a robust and powerful 4 | * application frontend using useful Laravel and JavaScript libraries. 5 | */ 6 | 7 | require('./bootstrap'); 8 | 9 | setTimeout(function () { 10 | $('.alert').slideUp(500); 11 | }, 5000); 12 | 13 | $.ajaxSetup({ 14 | headers: { 15 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 16 | } 17 | }); -------------------------------------------------------------------------------- /resources/assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | try { 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap-sass'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | /** 27 | * Next we will register the CSRF Token as a common header with Axios so that 28 | * all outgoing HTTP requests automatically have it attached. This is just 29 | * a simple convenience so we don't have to attach every token manually. 30 | */ 31 | 32 | let token = document.head.querySelector('meta[name="csrf-token"]'); 33 | 34 | if (token) { 35 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; 36 | } else { 37 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); 38 | } 39 | 40 | /** 41 | * Echo exposes an expressive API for subscribing to channels and listening 42 | * for events that are broadcast by Laravel. Echo and event broadcasting 43 | * allows your team to easily build robust real-time web applications. 44 | */ 45 | 46 | // import Echo from 'laravel-echo' 47 | 48 | // window.Pusher = require('pusher-js'); 49 | 50 | // window.Echo = new Echo({ 51 | // broadcaster: 'pusher', 52 | // key: 'your-pusher-key' 53 | // }); 54 | -------------------------------------------------------------------------------- /resources/assets/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // Body 3 | $body-bg: #f5f8fa; 4 | 5 | // Borders 6 | $laravel-border-color: darken($body-bg, 10%); 7 | $list-group-border: $laravel-border-color; 8 | $navbar-default-border: $laravel-border-color; 9 | $panel-default-border: $laravel-border-color; 10 | $panel-inner-border: $laravel-border-color; 11 | 12 | // Brands 13 | $brand-primary: #3097D1; 14 | $brand-info: #8eb4cb; 15 | $brand-success: #2ab27b; 16 | $brand-warning: #cbb956; 17 | $brand-danger: #bf5329; 18 | 19 | // Typography 20 | $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/"; 21 | $font-family-sans-serif: "Raleway", sans-serif; 22 | $font-size-base: 14px; 23 | $line-height-base: 1.6; 24 | $text-color: #636b6f; 25 | 26 | // Navbar 27 | $navbar-default-bg: #fff; 28 | 29 | // Buttons 30 | $btn-default-color: $text-color; 31 | 32 | // Inputs 33 | $input-border: lighten($text-color, 40%); 34 | $input-border-focus: lighten($brand-primary, 25%); 35 | $input-color-placeholder: lighten($text-color, 30%); 36 | 37 | // Panels 38 | $panel-default-heading-bg: #f2f2f2; 39 | -------------------------------------------------------------------------------- /resources/assets/sass/admin.scss: -------------------------------------------------------------------------------- 1 | $color1: #f4645f; 2 | $color2: #428bca; 3 | 4 | body { 5 | padding-top: 50px; 6 | } 7 | 8 | .sub-header { 9 | padding-bottom: 10px; 10 | border-bottom: 1px solid #eee; 11 | } 12 | 13 | .navbar-fixed-top { 14 | border: 0; 15 | } 16 | 17 | .sidebar { 18 | position: fixed; 19 | top: 51px; bottom: 0; left: 0; 20 | z-index: 1000; 21 | padding: 20px; 22 | overflow-x: hidden; overflow-y: auto; 23 | background-color: #f5f5f5; 24 | border-right: 1px solid #eee; 25 | 26 | .list-group-item { 27 | &+ .list-group { 28 | margin-left: 10px; 29 | } 30 | &.collapsed { 31 | .caret { 32 | border-top: 8px solid; 33 | border-bottom: 0; 34 | } 35 | } 36 | .caret { 37 | float: right; 38 | margin-top: 6px; 39 | border-bottom: 8px solid; 40 | border-top: 0; 41 | } 42 | } 43 | } 44 | 45 | @media (min-width: 768px) { 46 | .sidebar { 47 | display: block; 48 | height: auto !important; 49 | } 50 | } 51 | 52 | .nav-sidebar { 53 | margin-right: -21px; 54 | margin-bottom: 20px; 55 | margin-left: -20px; 56 | & > li > a { 57 | padding-right: 20px; 58 | padding-left: 20px; 59 | } 60 | 61 | & > .active > a, 62 | & > .active > a:hover, 63 | & > .active > a:focus { 64 | color: #fff; 65 | background-color: $color2; 66 | } 67 | } 68 | 69 | .main { 70 | padding: 20px; 71 | .page-header { 72 | margin-top: 0; 73 | } 74 | } 75 | 76 | .navbar-brand { 77 | font-size: 11px; 78 | } 79 | 80 | @media (min-width: 768px) { 81 | .main { 82 | padding-right: 40px; 83 | padding-left: 40px; 84 | } 85 | 86 | .navbar-brand { 87 | font-size: 18px; 88 | } 89 | } 90 | 91 | .placeholders { 92 | margin-bottom: 30px; 93 | text-align: center; 94 | h4 { 95 | margin-bottom: 0; 96 | font-size: 36px; 97 | } 98 | } 99 | 100 | .list-group-item { 101 | &.active, &.active:focus { 102 | background-color: $color1; 103 | border-color: $color1; 104 | } 105 | &:hover { 106 | background-color: #e74430 !important; 107 | border-color: #e74430 !important; 108 | color: #fff !important; 109 | .badge { 110 | background-color: #fff; 111 | color: #e74430 112 | } 113 | } 114 | } 115 | 116 | .btn-primary { 117 | background-color: $color1; 118 | border-color: $color1; 119 | 120 | &:hover, &:active, &:focus { 121 | background-color: #e74430 !important; 122 | border-color: #e74430 !important; 123 | color: #fff !important; 124 | } 125 | } 126 | 127 | .panel-primary { 128 | border-color: $color1; 129 | & > .panel-heading { 130 | color: #fff; 131 | background-color: $color1; 132 | border-color: $color1; 133 | } 134 | } 135 | 136 | .navbar-toggle { 137 | margin-left: 15px; 138 | } 139 | 140 | .checkbox label { 141 | margin-right: 20px; 142 | } -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600); 4 | 5 | // Variables 6 | @import "variables"; 7 | 8 | // Bootstrap 9 | @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 10 | 11 | @import "commerce"; -------------------------------------------------------------------------------- /resources/assets/sass/commerce.scss: -------------------------------------------------------------------------------- 1 | $theme-color1: #e52d04; 2 | html { 3 | font-size: 16px; 4 | } 5 | 6 | :focus { 7 | outline: none; 8 | } 9 | 10 | body { 11 | font-family: Raleway, 'Segoe UI', Arial, sans-serif; 12 | font-size: 1rem; 13 | } 14 | 15 | h1 { 16 | font-size: 28px; 17 | font-weight: 600; 18 | } 19 | 20 | a { 21 | color: #333; 22 | } 23 | 24 | #commerce { 25 | background-color: #f0f0f0; 26 | 27 | h2 { 28 | font-weight: 600; 29 | font-size: 1.8rem; 30 | } 31 | 32 | h3 { 33 | font-size: 1.6rem; 34 | } 35 | 36 | h4 { 37 | font-size: 1.4rem; 38 | margin-bottom: 5px; 39 | } 40 | 41 | .navbar-brand { 42 | width: 270px; 43 | 44 | img { 45 | height: 30px; 46 | margin-top: -6px; 47 | } 48 | } 49 | 50 | .panel-theme { 51 | border-color: #ddd; 52 | 53 | .panel-heading { 54 | color: #333; 55 | font-weight: 600; 56 | border-color: #ddd; 57 | border-top: 2px solid $theme-color1; 58 | background: linear-gradient(to bottom, #fff 0%, #dfdfdf 100%); 59 | } 60 | } 61 | 62 | .panel-default { 63 | h3 { 64 | font-size: 14px; 65 | font-weight: 600; 66 | margin: 0 10px 5px 10px; 67 | } 68 | } 69 | 70 | .badge-theme { 71 | font-weight: 400; 72 | background-color: $theme-color1; 73 | margin-top: -15px; 74 | } 75 | 76 | .btn-theme { 77 | background-color: $theme-color1; 78 | color: #fff; 79 | &:hover { 80 | filter: contrast(90%); 81 | } 82 | } 83 | 84 | #navbar-search { 85 | width: 400px; 86 | } 87 | 88 | .carousel { 89 | overflow: hidden; 90 | 91 | .carousel-caption { 92 | right: 0; 93 | left: 0; 94 | height: 54px; 95 | bottom: 0; 96 | background: rgba(0, 0, 0, .3); 97 | } 98 | 99 | img { 100 | height: 374px !important; 101 | } 102 | } 103 | 104 | #sidebar-product { 105 | height: 374px !important; 106 | } 107 | 108 | .list-group.categories { 109 | font-size: 0.8rem; 110 | } 111 | 112 | .bg-content { 113 | padding: 10px 15px; 114 | background-color: #fff; 115 | overflow: hidden; 116 | box-shadow: 0 1px 2px rgba(0, 0, 0, .3); 117 | } 118 | 119 | .products { 120 | 121 | .product { 122 | text-align: center; 123 | 124 | img { 125 | height: 200px; 126 | border-radius: 4px; 127 | margin-bottom: 5px; 128 | max-width: 100%; 129 | } 130 | 131 | .price { 132 | font-size: 20px; 133 | font-weight: 600; 134 | } 135 | } 136 | } 137 | .nav-tabs { 138 | padding-left: 6px; 139 | li.active a { 140 | font-weight: 600; 141 | border-bottom: inherit; 142 | margin-top: 3px; 143 | border-top: 2px solid $theme-color1; 144 | background: linear-gradient(to top, #fff 0%, #dfdfdf 100%); 145 | } 146 | } 147 | .tab-content { 148 | padding: 10px; 149 | border: 1px solid #ddd; 150 | margin-top: -1px; 151 | } 152 | 153 | .price { 154 | font-size: 24px; 155 | font-weight: 600; 156 | small { font-size: 14px; } 157 | } 158 | 159 | footer { 160 | background-color: #fff; 161 | padding: 50px; 162 | margin-top: 20px; 163 | } 164 | } -------------------------------------------------------------------------------- /resources/assets/sass/login.scss: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | body { 6 | padding-top: 50px; 7 | padding-bottom: 40px; 8 | background: #ffffff; 9 | background: radial-gradient(ellipse at center, #ffffff 0%, #c1c1c1 100%); 10 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#c1c1c1', GradientType=1); /* IE6-9 fallback on horizontal gradient */ 11 | } 12 | 13 | .form-signin { 14 | max-width: 330px; 15 | padding: 14px; 16 | margin: 0 auto; 17 | background-color: rgba(230, 230, 230, 0.5); 18 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.6); 19 | border-radius: 6px; 20 | border: 1px solid #ddd; 21 | 22 | img { 23 | display: block; margin: 0 auto 14px; 24 | border-radius: 6px; 25 | } 26 | 27 | .links { 28 | margin-top: 10px; 29 | a { 30 | color: #444; 31 | } 32 | } 33 | 34 | .checkbox { 35 | margin-bottom: 10px; 36 | font-weight: normal; 37 | text-align: left; 38 | padding-left: 12px; 39 | } 40 | 41 | .form-control { 42 | position: relative; 43 | height: auto; 44 | box-sizing: border-box; 45 | padding: 10px; 46 | font-size: 16px; 47 | &:focus { 48 | z-index: 2; 49 | } 50 | } 51 | 52 | input[type="email"] { 53 | margin-bottom: -1px; 54 | border-bottom-right-radius: 0; 55 | border-bottom-left-radius: 0; 56 | } 57 | 58 | input[type="password"] { 59 | margin-bottom: 10px; 60 | border-top-left-radius: 0; 61 | border-top-right-radius: 0; 62 | } 63 | 64 | .btn-primary { 65 | background-color: #f4645f; 66 | border-color: #f4645f; 67 | &:hover { 68 | background-color: #e74430 !important; 69 | border-color: #e74430 !important; 70 | color: #fff !important; 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Önceki', 17 | 'next' => 'Sonraki »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/views/arama.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('content') 3 | 4 |
5 | 6 | 10 | 11 |
12 |
13 | @if (count($urunler)==0) 14 |
15 | Bir ürün bulunamadı! 16 |
17 | @endif 18 | @foreach($urunler as $urun) 19 |
20 | 21 | {{ $urun->urun_adi }} 22 | 23 |

24 | 25 | {{ $urun->urun_adi }} 26 | 27 |

28 |

{{ $urun->fiyati }} ₺

29 |
30 | @endforeach 31 |
32 | {{ $urunler->appends(['aranan' => old('aranan')])->links() }} 33 |
34 | 35 |
36 | 37 | @endsection -------------------------------------------------------------------------------- /resources/views/errors/404.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('content') 3 |
4 |
5 |

404

6 |

Aradığınız sayfa bulunamadı!

7 | Anasayfa'ya Dön 8 |
9 |
10 | @endsection -------------------------------------------------------------------------------- /resources/views/errors/500.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('content') 3 |
4 |
5 |

500

6 |

Bir hata oluştu!

7 | Anasayfa'ya Dön 8 |
9 |
10 | @endsection -------------------------------------------------------------------------------- /resources/views/kategori.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('title', $kategori->kategori_adi) 3 | @section('content') 4 |
5 | 9 |
10 |
11 |
12 |
{{ $kategori->kategori_adi }}
13 |
14 | Toplam {{ $kategori->urunler->count() }} ürün var. 15 |
16 | @if (count($alt_kategoriler)>0) 17 | 18 |
19 | @else 20 | @if ($ust_kategori != null) 21 | 22 | 23 | {{ $ust_kategori->kategori_adi }} 24 | 25 | @endif 26 | 27 | {{ $kategori->kategori_adi }} kategorisinde başka alt kategori bulunmuyor. 28 | @endif 29 |
30 |
31 |
32 |
33 |
34 | @if (count($urunler)>0) 35 | Sırala 36 | Çok Satanlar 37 | Yeni Ürünler 38 |
39 | @endif 40 |
41 | @if (count($urunler)==0) 42 |
Bu kategoride henüz ürün bulunmamaktadır!
43 | @endif 44 | @foreach($urunler as $urun) 45 |
46 | 47 | 48 | 49 |

{{ $urun->urun_adi }}

50 |

{{ round($urun->fiyati, 2) }} ₺

51 |

Sepete Ekle

52 |
53 | @endforeach 54 |
55 | {{ request()->has('order') ? $urunler->appends(['order' => request('order')])->links() : $urunler->links() }} 56 |
57 |
58 |
59 | 60 | @endsection -------------------------------------------------------------------------------- /resources/views/kullanici/kaydol.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('title', 'Kaydol') 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Kaydol
9 |
10 | 11 | @include('layouts.partials.errors') 12 | 13 |
14 | {{ csrf_field() }} 15 |
16 | 17 |
18 | 19 |
20 |
21 | 22 |
23 | 24 |
25 | 26 |
27 |
28 | 29 |
30 | 31 |
32 | 33 |
34 |
35 | 36 |
37 | 38 |
39 | 40 |
41 |
42 | 43 |
44 |
45 | 48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | @endsection -------------------------------------------------------------------------------- /resources/views/kullanici/oturumac.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('title', 'Oturum Aç') 3 | @section('content') 4 |
5 | @include('layouts.partials.alert') 6 | 7 |
8 |
9 |
10 |
Oturum Aç
11 |
12 | @include('layouts.partials.errors') 13 | 14 |
15 | {{ csrf_field() }} 16 | 17 |
18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 | 26 |
27 | 28 |
29 |
30 | 31 |
32 |
33 |
34 | 37 |
38 |
39 |
40 | 41 |
42 |
43 | 46 | 47 | 48 | Şifremi Unuttum 49 | 50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | @endsection -------------------------------------------------------------------------------- /resources/views/layouts/master.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @yield('title', config('app.name')) 6 | @include('layouts.partials.head') 7 | @yield('head') 8 | 9 | 10 | @include('layouts.partials.navbar') 11 | @yield('content') 12 | @include('layouts.partials.footer') 13 | 14 | 15 | @yield('footer') 16 | 17 | -------------------------------------------------------------------------------- /resources/views/layouts/partials/alert.blade.php: -------------------------------------------------------------------------------- 1 | @if (session()->has('mesaj')) 2 |
{{ session('mesaj') }}
3 | @endif -------------------------------------------------------------------------------- /resources/views/layouts/partials/errors.blade.php: -------------------------------------------------------------------------------- 1 | @if ($errors->any()) 2 |
3 | 8 |
9 | @endif -------------------------------------------------------------------------------- /resources/views/layouts/partials/footer.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/layouts/partials/head.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resources/views/layouts/partials/navbar.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/mails/kullanici_kayit.blade.php: -------------------------------------------------------------------------------- 1 |

{{ config('app.name') }}

2 |

Merhaba {{ $kullanici->adsoyad }}, kaydınız başarılı bir şekilde yapıldı.

3 |

Kaydınızı aktifleştirmek için tıklayın veya aşağıdaki bağlantıyı tarayıcınızda açın.

4 |

{{ config('app.url') }}/kullanici/aktiflestir/{{ $kullanici->aktivasyon_anahtari }}

-------------------------------------------------------------------------------- /resources/views/sepet.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('title', 'Sepet') 3 | @section('content') 4 |
5 |
6 |

Sepet

7 | @include('layouts.partials.alert') 8 | 9 | @if (count(Cart::content())>0) 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | @foreach(Cart::content() as $urunCartItem) 18 | 19 | 24 | 34 | 35 | 40 | 43 | 44 | @endforeach 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |
ÜrünAdet FiyatıAdetTutar
20 | 21 | 22 | 23 | 25 | 26 | {{ $urunCartItem->name }} 27 | 28 |
29 | {{ csrf_field() }} 30 | {{ method_field('DELETE') }} 31 | 32 |
33 |
{{ $urunCartItem->price }} ₺ 36 | - 37 | {{ $urunCartItem->qty }} 38 | + 39 | 41 | {{ $urunCartItem->subtotal }} ₺ 42 |
Alt Toplam{{ Cart::subtotal() }} ₺
KDV{{ Cart::tax() }} ₺
Genel Toplam{{ Cart::total() }} ₺
58 | 59 |
60 | {{ csrf_field() }} 61 | {{ method_field('DELETE') }} 62 | 63 |
64 | Ödeme Yap 65 | @else 66 |

Sepetinizde ürün yok!

67 | @endif 68 |
69 |
70 | @endsection 71 | 72 | @section('footer') 73 | 89 | @endsection -------------------------------------------------------------------------------- /resources/views/siparis.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('title', 'Sipariş Detayı') 3 | @section('content') 4 |
5 |
6 | 7 | Siparişlere Dön 8 | 9 |

Sipariş (SP-{{ $siparis->id }})

10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | @foreach($siparis->sepet->sepet_urunler as $sepet_urun) 19 | 20 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | @endforeach 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
ÜrünTutarAdetAra ToplamDurum
21 | 22 | 23 | 24 | 26 | 27 | {{ $sepet_urun->urun->urun_adi }} 28 | 29 | {{ $sepet_urun->fiyati }} ₺{{ $sepet_urun->adet }}{{ $sepet_urun->fiyati * $sepet_urun->adet }} ₺{{ $sepet_urun->durum }}
Toplam Tutar{{ $siparis->siparis_tutari }} ₺
Toplam Tutar (KDV'li){{ $siparis->siparis_tutari* ((100+config('cart.tax'))/100) }} ₺
Sipariş Durumu{{ $siparis->durum }}
49 |
50 |
51 | @endsection -------------------------------------------------------------------------------- /resources/views/siparisler.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('title', 'Siparişler') 3 | @section('content') 4 |
5 |
6 |

Siparişler

7 | @if (count($siparisler) == 0) 8 |

Henüz siparişiniz yok

9 | @else 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | @foreach($siparisler as $siparis) 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @endforeach 27 |
Sipariş KoduTutarToplam ÜrünDurum
SP-{{ $siparis->id }}{{ $siparis->siparis_tutari * ((100+config('cart.tax'))/100) }}{{ $siparis->sepet->sepet_urun_adet() }}{{ $siparis->durum }}Detay
28 | @endif 29 |
30 |
31 | @endsection -------------------------------------------------------------------------------- /resources/views/urun.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.master') 2 | @section('title', $urun->urun_adi) 3 | @section('content') 4 |
5 | 12 |
13 |
14 |
15 | 16 |
17 |
18 |
19 | 20 |
21 |
22 | 23 |
24 |
25 | 26 |
27 |
28 |
29 |
30 |

{{ $urun->urun_adi }}

31 |

{{ round($urun->fiyati, 2) }} ₺

32 |
33 | {{ csrf_field() }} 34 | 39 | 40 | 41 |
42 |
43 |
44 | 45 |
46 | 50 |
51 |
52 | {{ $urun->aciklama }} 53 |
54 |
55 | Henüz yorum yapılmadı! 56 |
57 |
58 |
59 | 60 |
61 |
62 | @endsection -------------------------------------------------------------------------------- /resources/views/yonetim/kategori/form.blade.php: -------------------------------------------------------------------------------- 1 | @extends('yonetim.layouts.master') 2 | @section('title', 'Kategori Yönetimi') 3 | @section('content') 4 |

Kategori Yönetimi

5 | 6 |
7 | {{ csrf_field() }} 8 | 9 |
10 | 13 |
14 |

15 | Kategori {{ $entry->id > 0 ? "Düzenle" : "Ekle" }} 16 |

17 | 18 | @include('layouts.partials.errors') 19 | @include('layouts.partials.alert') 20 | 21 |
22 |
23 |
24 | 25 | 31 |
32 |
33 |
34 |
35 |
36 |
37 | 38 | 39 |
40 |
41 |
42 |
43 |
44 |
45 | 46 | 47 | 48 |
49 |
50 |
51 |
52 | @endsection -------------------------------------------------------------------------------- /resources/views/yonetim/kategori/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('yonetim.layouts.master') 2 | @section('title', 'Kategori Yönetimi') 3 | @section('content') 4 |

Kategori Yönetimi

5 | 6 |

Kategori Listesi

7 |
8 |
9 | Yeni 10 |
11 |
12 | {{ csrf_field() }} 13 |
14 | 15 | 16 | 17 | 23 |
24 | 25 | Temizle 26 |
27 |
28 | 29 | @include('layouts.partials.alert') 30 | 31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | @if (count($list) == 0) 45 | 46 | @endif 47 | @foreach ($list as $entry) 48 | 49 | 50 | 51 | 52 | 53 | 54 | 62 | 63 | @endforeach 64 | 65 |
#Üst KategoriSlugKategori AdıKayıt Tarihi
Kayıt bulunamadı!
{{ $entry->id }}{{ $entry->ust_kategori->kategori_adi }}{{ $entry->slug }}{{ $entry->kategori_adi }}{{ $entry->olusturma_tarihi }} 55 | 56 | 57 | 58 | 59 | 60 | 61 |
66 | {{ $list->links() }} 67 |
68 | @endsection -------------------------------------------------------------------------------- /resources/views/yonetim/kullanici/form.blade.php: -------------------------------------------------------------------------------- 1 | @extends('yonetim.layouts.master') 2 | @section('title', 'Kullanıcı Yönetimi') 3 | @section('content') 4 |

Kullanıcı Yönetimi

5 | 6 |
7 | {{ csrf_field() }} 8 | 9 |
10 | 13 |
14 |

15 | Kullanıcı {{ $entry->id > 0 ? "Düzenle" : "Ekle" }} 16 |

17 | 18 | @include('layouts.partials.errors') 19 | @include('layouts.partials.alert') 20 | 21 |
22 |
23 |
24 | 25 | 26 |
27 |
28 |
29 |
30 | 31 | 32 |
33 |
34 |
35 |
36 | 37 | 38 |
39 |
40 |
41 |
42 |
43 |
44 | 45 | 46 |
47 |
48 |
49 |
50 |
51 |
52 | 53 | 54 |
55 |
56 |
57 |
58 |
59 |
60 | 61 | 62 |
63 |
64 |
65 |
66 | 70 |
71 |
72 | 76 |
77 |
78 | @endsection -------------------------------------------------------------------------------- /resources/views/yonetim/kullanici/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('yonetim.layouts.master') 2 | @section('title', 'Kullanıcı Yönetimi') 3 | @section('content') 4 |

Kullanıcı Yönetimi

5 | 6 |

Kullanıcı Listesi

7 |
8 |
9 | Yeni 10 |
11 |
12 | {{ csrf_field() }} 13 |
14 | 15 | 16 |
17 | 18 | Temizle 19 |
20 |
21 | 22 | @include('layouts.partials.alert') 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | @if (count($list) == 0) 39 | 40 | @endif 41 | @foreach ($list as $entry) 42 | 43 | 44 | 45 | 46 | 53 | 60 | 61 | 69 | 70 | @endforeach 71 | 72 |
#Ad SoyadEmailAktif MiKullanıcı TipiKayıt Tarihi
Kayıt bulunamadı!
{{ $entry->id }}{{ $entry->adsoyad }}{{ $entry->email }} 47 | @if ($entry->aktif_mi) 48 | Aktif 49 | @else 50 | Pasif 51 | @endif 52 | 54 | @if ($entry->yonetici_mi) 55 | Yönetici 56 | @else 57 | Müşteri 58 | @endif 59 | {{ $entry->olusturma_tarihi }} 62 | 63 | 64 | 65 | 66 | 67 | 68 |
73 | {{ $list->links() }} 74 |
75 | @endsection -------------------------------------------------------------------------------- /resources/views/yonetim/layouts/master.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @yield('title', config('app.name') . " | Yönetim") 6 | 7 | 8 | 9 | 10 | @yield('head') 11 | 12 | 13 | 14 | @include('yonetim.layouts.partials.navbar') 15 |
16 |
17 | 20 |
21 | @yield('content') 22 |
23 |
24 |
25 | 26 | 27 | 28 | @yield('footer') 29 | 30 | -------------------------------------------------------------------------------- /resources/views/yonetim/layouts/partials/navbar.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/yonetim/layouts/partials/sidebar.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | Kontrol Paneli 4 | 5 | 6 | Ürünler 7 | {{ $istatistikler['toplam_urun'] }} 8 | 9 | 10 | Kategoriler 11 | {{ $istatistikler['toplam_kategori'] }} 12 | 13 | 14 | Ürün Yorumları 15 | 16 | 17 |
18 | Category 19 | Category 20 |
21 | 22 | Kullanıcılar 23 | {{ $istatistikler['toplam_kullanici'] }} 24 | 25 | 26 | Siparişler 27 | 28 | {{ $istatistikler['bekleyen_siparis'] }} 29 | 30 | 31 | 32 |
33 | Çok Satan Ürünler 34 | Günlere Göre Satışlar 35 |
36 | 37 | Site Ayarları 38 | 39 |
-------------------------------------------------------------------------------- /resources/views/yonetim/oturumac.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Eticaret Projesi - Yönetim 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | {{ csrf_field() }} 14 | 15 | 16 | @include('layouts.partials.errors') 17 | 18 | 19 | 20 | 21 | 22 |
23 | 26 |
27 | 28 | 31 |
32 |
33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /resources/views/yonetim/siparis/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('yonetim.layouts.master') 2 | @section('title', 'Sipariş Yönetimi') 3 | @section('content') 4 |

Sipariş Yönetimi

5 | 6 |

Sipariş Listesi

7 |
8 |
9 | {{ csrf_field() }} 10 |
11 | 12 | 13 |
14 | 15 | Temizle 16 |
17 |
18 | 19 | @include('layouts.partials.alert') 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | @if (count($list) == 0) 35 | 36 | 37 | 38 | @endif 39 | @foreach ($list as $entry) 40 | 41 | 42 | 43 | 44 | 45 | 46 | 54 | 55 | @endforeach 56 | 57 |
Sipariş KoduMüşteriTutarDurumSipariş Tarihi
Kayıt bulunamadı!
SP-{{ $entry->id }}{{ $entry->sepet->kullanici->adsoyad }}{{ $entry->siparis_tutari * ((100 + config('cart.tax')) / 100) }} ₺{{ $entry->durum }}{{ $entry->olusturma_tarihi }} 47 | 48 | 49 | 50 | 51 | 52 | 53 |
58 | {{ $list->links() }} 59 |
60 | @endsection -------------------------------------------------------------------------------- /resources/views/yonetim/urun/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('yonetim.layouts.master') 2 | @section('title', 'Ürün Yönetimi') 3 | @section('content') 4 |

Ürün Yönetimi

5 | 6 |

Ürün Listesi

7 |
8 |
9 | Yeni 10 |
11 |
12 | {{ csrf_field() }} 13 |
14 | 15 | 16 |
17 | 18 | Temizle 19 |
20 |
21 | 22 | @include('layouts.partials.alert') 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | @if (count($list) == 0) 39 | 40 | @endif 41 | @foreach ($list as $entry) 42 | 43 | 44 | 47 | 48 | 49 | 50 | 51 | 59 | 60 | @endforeach 61 | 62 |
#ResimSlugÜrün AdıFiyatıKayıt Tarihi
Kayıt bulunamadı!
{{ $entry->id }} 45 | 46 | {{ $entry->slug }}{{ $entry->urun_adi }}{{ round($entry->fiyati, 2) }} ₺{{ $entry->olusturma_tarihi }} 52 | 53 | 54 | 55 | 56 | 57 | 58 |
63 | {{ $list->links() }} 64 |
65 | @endsection -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 17 | return $request->user(); 18 | }); 19 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 16 | }); 17 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | 'yonetim', 'namespace' => 'Yonetim'], function () { 3 | Route::redirect('/', '/yonetim/oturumac'); 4 | 5 | Route::match(['get', 'post'], '/oturumac', 'KullaniciController@oturumac')->name('yonetim.oturumac'); 6 | Route::get('/oturumukapat', 'KullaniciController@oturumukapat')->name('yonetim.oturumukapat'); 7 | 8 | Route::group(['middleware' => 'yonetim'], function () { 9 | Route::get('/anasayfa', 'AnasayfaController@index')->name('yonetim.anasayfa'); 10 | 11 | Route::group(['prefix' => 'kullanici'], function () { 12 | Route::match(['get', 'post'], '/', 'KullaniciController@index')->name('yonetim.kullanici'); 13 | Route::get('/yeni', 'KullaniciController@form')->name('yonetim.kullanici.yeni'); 14 | Route::get('/duzenle/{id}', 'KullaniciController@form')->name('yonetim.kullanici.duzenle'); 15 | Route::post('/kaydet/{id?}', 'KullaniciController@kaydet')->name('yonetim.kullanici.kaydet'); 16 | Route::get('/sil/{id}', 'KullaniciController@sil')->name('yonetim.kullanici.sil'); 17 | }); 18 | 19 | Route::group(['prefix' => 'kategori'], function () { 20 | Route::match(['get', 'post'], '/', 'KategoriController@index')->name('yonetim.kategori'); 21 | Route::get('/yeni', 'KategoriController@form')->name('yonetim.kategori.yeni'); 22 | Route::get('/duzenle/{id}', 'KategoriController@form')->name('yonetim.kategori.duzenle'); 23 | Route::post('/kaydet/{id?}', 'KategoriController@kaydet')->name('yonetim.kategori.kaydet'); 24 | Route::get('/sil/{id}', 'KategoriController@sil')->name('yonetim.kategori.sil'); 25 | }); 26 | 27 | Route::group(['prefix' => 'urun'], function () { 28 | Route::match(['get', 'post'], '/', 'UrunController@index')->name('yonetim.urun'); 29 | Route::get('/yeni', 'UrunController@form')->name('yonetim.urun.yeni'); 30 | Route::get('/duzenle/{id}', 'UrunController@form')->name('yonetim.urun.duzenle'); 31 | Route::post('/kaydet/{id?}', 'UrunController@kaydet')->name('yonetim.urun.kaydet'); 32 | Route::get('/sil/{id}', 'UrunController@sil')->name('yonetim.urun.sil'); 33 | }); 34 | 35 | Route::group(['prefix' => 'siparis'], function () { 36 | Route::match(['get', 'post'], '/', 'SiparisController@index')->name('yonetim.siparis'); 37 | Route::get('/yeni', 'SiparisController@form')->name('yonetim.siparis.yeni'); 38 | Route::get('/duzenle/{id}', 'SiparisController@form')->name('yonetim.siparis.duzenle'); 39 | Route::post('/kaydet/{id?}', 'SiparisController@kaydet')->name('yonetim.siparis.kaydet'); 40 | Route::get('/sil/{id}', 'SiparisController@sil')->name('yonetim.siparis.sil'); 41 | }); 42 | 43 | }); 44 | }); 45 | 46 | Route::get('/', 'AnasayfaController@index')->name('anasayfa'); 47 | 48 | Route::get('/kategori/{slug_kategoriadi}', 'KategoriController@index')->name('kategori'); 49 | 50 | Route::get('/urun/{slug_urunadi}', 'UrunController@index')->name('urun'); 51 | 52 | Route::post('/ara', 'UrunController@ara')->name('urun_ara'); 53 | Route::get('/ara', 'UrunController@ara')->name('urun_ara'); 54 | 55 | Route::group(['prefix' => 'sepet'], function () { 56 | Route::get('/', 'SepetController@index')->name('sepet'); 57 | Route::post('/ekle', 'SepetController@ekle')->name('sepet.ekle'); 58 | Route::delete('/kaldir/{rowid}', 'SepetController@kaldir')->name('sepet.kaldir'); 59 | Route::delete('/bosalt', 'SepetController@bosalt')->name('sepet.bosalt'); 60 | Route::patch('/guncelle/{rowid}', 'SepetController@guncelle')->name('sepet.guncelle'); 61 | }); 62 | 63 | Route::get('/odeme', 'OdemeController@index')->name('odeme'); 64 | Route::post('/odeme', 'OdemeController@odemeyap')->name('odemeyap'); 65 | 66 | Route::group(['middleware' => 'auth'], function () { 67 | Route::get('/siparisler', 'SiparisController@index')->name('siparisler'); 68 | Route::get('/siparisler/{id}', 'SiparisController@detay')->name('siparis'); 69 | }); 70 | 71 | Route::group(['prefix' => 'kullanici'], function () { 72 | Route::get('/oturumac', 'KullaniciController@giris_form')->name('kullanici.oturumac'); 73 | Route::post('/oturumac', 'KullaniciController@giris'); 74 | Route::get('/kaydol', 'KullaniciController@kaydol_form')->name('kullanici.kaydol'); 75 | Route::post('/kaydol', 'KullaniciController@kaydol'); 76 | Route::get('/aktiflestir/{anahtar}', 'KullaniciController@aktiflestir')->name('aktiflestir'); 77 | Route::post('/oturumukapat', 'KullaniciController@oturumukapat')->name('kullanici.oturumukapat'); 78 | }); 79 | 80 | Route::get('/test/mail', function () { 81 | $kullanici = \App\Models\Kullanici::find(1); 82 | 83 | return new App\Mail\KullaniciKayitMail($kullanici); 84 | }); -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | let mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/assets/js/app.js', 'public/js') 15 | .sass('resources/assets/sass/app.scss', 'public/css'); 16 | 17 | mix.copy('resources/assets/js/admin-app.js', 'public/js/admin-app.js'); 18 | mix.sass('resources/assets/sass/admin.scss', 'public/css'); 19 | mix.sass('resources/assets/sass/login.scss', 'public/css'); --------------------------------------------------------------------------------