| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?php
- namespace App\Http\Controllers;
- use App\Music;
- use Illuminate\Http\Request;
- class MusicController extends Controller
- {
- /**
- * Display a listing of the resource.
- *
- * @return \Illuminate\Http\Response
- */
- public function index()
- {
- // list all songs
- $songs = Music::all();
- return view('home', ['song_list'=>$songs]);
- }
- public function playlog(Music $music){
- // add one to played log
- $music->played += 1;
- $music->save();
- return $music->played;
- }
- public function dwlog(Music $music){
- // add one to download log
- $music->downloads += 1;
- $music->save();
- return $music->downloads;
- }
- public function null(Music $music){
- return null;
- }
- /**
- * Show the form for creating a new resource.
- *
- * @return \Illuminate\Http\Response
- */
- public function create()
- {
- //
- }
- /**
- * Store a newly created resource in storage.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
- */
- public function store(Request $request)
- {
- //
- }
- /**
- * Display the specified resource.
- *
- * @param \App\Music $music
- * @return \Illuminate\Http\Response
- */
- public function show(Music $music)
- {
- //
- }
- /**
- * Show the form for editing the specified resource.
- *
- * @param \App\Music $music
- * @return \Illuminate\Http\Response
- */
- public function edit(Music $music)
- {
- //
- }
- /**
- * Update the specified resource in storage.
- *
- * @param \Illuminate\Http\Request $request
- * @param \App\Music $music
- * @return \Illuminate\Http\Response
- */
- public function update(Request $request, Music $music)
- {
- //
- }
- /**
- * Remove the specified resource from storage.
- *
- * @param \App\Music $music
- * @return \Illuminate\Http\Response
- */
- public function destroy(Music $music)
- {
- //
- }
- }
|