/**
  * Create a new Larabook user.
  *
  * @return string
  */
 public function store()
 {
     $this->registrationForm->validate(Input::all());
     $user = $this->execute(RegisterUserCommand::class);
     Auth::login($user);
     Flash::overlay('Glad to have you as a new Larabook member!');
     return Redirect::home();
 }
 public function store()
 {
     $this->registrationForm->validate(Input::all());
     $user = $this->execute(RegisterUserCommand::class);
     Auth::login($user);
     Flash::overlay('Welcome to Jamalot! Where We Jam Lots!');
     return Redirect::action('UsersController@create');
 }
 /**
  * @return mixed
  */
 public function store()
 {
     $this->registrationForm->validate(Input::all());
     $user = $this->execute(RegisterUserCommand::class);
     Auth::login($user);
     Flash::overlay(Lang::get('default.Welcome Onboard'));
     return Redirect::home();
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $input = Input::only('username', 'email', 'password', 'password_confirmation');
     $this->registrationForm->validate($input);
     $user = User::create($input);
     Auth::login($user);
     Flash::overlay('Glad to have you as a new MovieApp member!', 'Welcome');
     return Redirect::home();
 }
Ejemplo n.º 5
0
 /**
  * Store a newly created resource in storage.
  * POST /posts
  *
  * @return Response
  */
 public function store()
 {
     $input = Input::only('post');
     $this->postForm->validate($input);
     $post = new Post($input);
     $user = User::find(Auth::id());
     $post = $user->posts()->save($post);
     Flash::overlay('Post Success!', 'Good Job');
     return Redirect::back();
 }
 /**
  * Create a new Larabook user
  *
  * @return string
  */
 public function store()
 {
     $this->registrationForm->validate(Input::all());
     // extract(Input::only('username','email','password'));
     // $command = new RegisterUserCommand($username, $email, $password);
     // $user = $this->execute($command);
     $user = $this->execute(RegisterUserCommand::class);
     Auth::login($user);
     Flash::overlay('Bro, I know you are now our member, but, do yo even lift? How can I sell you a membership to someone without muscle?');
     return Redirect::home();
 }
Ejemplo n.º 7
0
 public function Ugsend($id)
 {
     $send = Sends::findOrNew($id);
     $music = \Input::get('music');
     $name = $send->name;
     $data = array('send' => $send, 'music' => $music, 'name' => $name);
     \Mail::send('email.send', $data, function ($message) {
         $message->to(\Input::get('email'), "Myanmar Music Art UG Songs")->subject("Myanmar Music Art တြင္သီခ်င္းေတာင္းဆုိထားျခင္း");
     });
     \Flash::overlay('Mail Send Finish!', "Complete.");
     return \Redirect::to('/backend/admin/ugsongs/request');
 }
Ejemplo n.º 8
0
 public function request()
 {
     $rules = array('name' => 'required', 'songname' => 'required', 'singer' => 'required', 'email' => 'required|email');
     $validator = Validator::make(\Input::all(), $rules);
     if ($validator->fails()) {
         return \Redirect::to('/request')->withErrors($validator)->withInput();
     } else {
         $request = new Request();
         $request->name = \Input::get('name');
         $request->songname = \Input::get('songname');
         $request->singer = \Input::get('singer');
         $request->email = \Input::get('email');
         $request->save();
         \Flash::overlay('Your Request Has Been Complete.', "Thank you for your request");
         return \Redirect::to('/request');
     }
 }
Ejemplo n.º 9
0
 public function send()
 {
     $rules = array('name' => 'required', 'songname' => 'required', 'singer' => 'required', 'email' => 'required|email', 'image' => 'required|mimes:jpeg,png,jpg');
     $validator = Validator::make(\Input::all(), $rules);
     if ($validator->fails()) {
         return \Redirect::to('/ug/send')->withErrors($validator)->withInput();
     } else {
         if (\Input::hasfile('mp3')) {
             if (\Input::file('mp3')->getClientOriginalExtension() != "mp3") {
                 $error = array();
                 $error[] = "File type must be mp3";
                 $validator = $error;
                 return \Redirect::to('/ug/send')->withInput()->withErrors($validator);
             } else {
                 $mp3path = public_path() . '/upload/send/mp3';
                 $mp3name = \Input::file('mp3')->getClientOriginalname();
                 \Input::file('mp3')->move($mp3path, $mp3name);
                 $imagepath = public_path() . '/upload/send/image';
                 $imagename = \Input::file('image')->getClientOriginalExtension();
                 $imgrename = str_random(20);
                 $imgFileName = $imgrename . "." . $imagename;
                 \Input::file('image')->move($imagepath, $imgrename . "." . $imagename);
                 $send = new Sends();
                 $send->name = \Input::get('name');
                 $send->songname = \Input::get('songname');
                 $send->singer = \Input::get('singer');
                 $send->email = \Input::get('email');
                 $send->mp3 = asset('upload/send/mp3/' . $mp3name);
                 $send->image = asset('upload/send/image/' . $imgFileName);
                 $send->mp3filename = $mp3name;
                 $send->imagefilename = $imgFileName;
                 $send->save();
                 \Flash::overlay('Please Wait! While We Finish Upload in Myanmar Music Art.', "Thank you for your music");
                 return \Redirect::to('/ug/send');
             }
         }
     }
 }
Ejemplo n.º 10
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     //
     $this->validate($request, ['songname' => 'required|max:1000', 'singer' => 'required|max:255', 'content' => 'required']);
     $singlemusic = SingleMusic::findOrNew($id);
     if (\Input::hasfile('photo')) {
         $imagepath = public_path() . '/upload/image';
         $imagename = \Input::file('photo')->getClientOriginalExtension();
         $imgrename = str_random(20);
         $singlemusic->image = asset('/upload/image/' . $imgrename . "." . $imagename);
         $imgFileName = $imgrename . "." . $imagename;
         \Input::file('photo')->move($imagepath, $imgrename . "." . $imagename);
         $singlemusic->imageName = $imgFileName;
     }
     if (\Input::hasfile('mp3')) {
         if (\Input::file('mp3')->getClientOriginalExtension() != "mp3") {
             $error = array();
             $error[] = "File type must be mp3";
             $validator = $error;
             return \Redirect::to('/backend/admin/mobile/songs/create')->withInput()->withErrors($validator);
         } else {
             $time = Carbon::now();
             $mp3path = public_path() . '/download/mp3/' . \Auth::user()->name . "/" . $time->year . "-" . $time->month;
             $mp3name = \Input::file('mp3')->getClientOriginalName();
             // $mp3rename = str_random(20);
             \Input::file('mp3')->move($mp3path, $mp3name);
             //  $uploadedfile = Storage::get($mp3rename.".".$mp3name);
             // Storage::disk('s3')->put($mp3rename.".".$mp3name, $uploadedfile);
             //  $url = Storage::disk('s3')->getDriver()->getAdapter()->getClient()->getObjectUrl('myanmarmusicart',$mp3rename.".".$mp3name);
             //  \File::delete(public_path().'/download/mp3/'. \Auth::user()->name."/". $time->year."-".$time->month."/".$mp3name);
             $encodeMp3name = rawurlencode($mp3name);
             $url = asset('/download/mp3/' . \Auth::user()->name . "/" . $time->year . "-" . $time->month . "/" . $encodeMp3name);
             $singlemusic->mp3 = $url;
         }
     }
     $singlemusic->songtitle = $request->input('songname');
     $singlemusic->singer = $request->input('singer');
     $singlemusic->language = $request->input('language');
     $singlemusic->categories = $request->input('categories');
     $singlemusic->content = $request->input('content');
     //   $singlemusic -> author =  \Auth::user() -> nickname;
     $singlemusic->save();
     \Flash::overlay('Mobile Api Edited!', "Complete");
     return \Redirect::to('/backend/admin/mobile/songs/');
 }
 public function mantenimiento()
 {
     Flash::overlay('Bien! su mensaje se envio correctamente');
     return Redirect::to('/');
 }