Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Http\Controllers;
- use Illuminate\Http\Request;
- use App\Pemrograman;
- use App\Platform;
- use App\Buku;
- class BukuController extends Controller
- {
- public function index()
- {
- // $buku = Buku::all();
- // return view('post.index', compact('buku'));
- }
- public function create()
- {
- $pemrogramans = Pemrograman::all();
- $platforms = Platform::all();
- return view('buku.create', compact('pemrogramans', 'platforms'));
- }
- public function store()
- {
- Buku::create([
- 'kodeBuku' => request('kodeBuku'),
- 'judul' => request('judul'),
- 'penulis' => request('penulis'),
- 'penerbit' => request('penerbit'),
- 'tahunTerbit' => request('tahunTerbit'),
- 'gambar' => request('gambar'),
- 'kodeRak' => request('kodeRak'),
- 'kodeKolom' =>request('kodeKolom'),
- 'platform_id' => request('platform_id'),
- 'pemrograman_id' =>request('pemrograman_id'),
- 'stok' => request('stok')
- ]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement