public function check(Request $request)
 {
     $email = $request->email;
     try {
         $user = User::where('email', $email)->first();
         if ($user == null) {
             $user = new User();
             $user->firstname = $request->firstname;
             $user->lastname = $request->lastname;
             $user->username = $request->username;
             $user->email = $request->email;
             $user->gender = $request->gender;
             $user->country = $request->country;
             $user->birthday = $request->birthday;
             $user->password = \Hash::make($request->password);
             $user->orientation = $request->orientation;
             $user->role = 'user';
             if ($user->save()) {
                 $about = new About();
                 $about->user_id = User::where('email', $email)->get(['id'])[0]->id;
                 $lookingFor = new LookingFor();
                 $lookingFor->user_id = User::where('email', $email)->get(['id'])[0]->id;
                 if ($about->save() && $lookingFor->save()) {
                     return response()->json(['status' => 201], 201);
                 }
             } else {
                 return response()->json(['status' => 404], 404);
             }
         } else {
             return response()->json(['status' => 200, 'exists' => true], 200);
         }
     } catch (Illuminate\Database\QueryException $e) {
         return response()->json(['status' => 505], 505);
     }
 }
Beispiel #2
0
 public function update_about()
 {
     $data = Input::all();
     $about = new About();
     $about->update_about($data);
     return redirect('auth/about')->with(array('success_update_about' => 'Successfully Updated'));
 }
Beispiel #3
0
 public function get()
 {
     $about = new About();
     $data_about = $about->get_about();
     $products = new Products();
     $sub_products = new SubProducts();
     $result_category = $products->get_category();
     foreach ($result_category as $results_category) {
         $menu_result[$results_category->category_name] = $sub_products->get_sub_category_by_category_id($results_category->id);
     }
     return view('about', compact('result_category', 'menu_result', 'data_about'));
 }
 /**
  * Handle the command.
  *
  * @param  AboutCommand  $command
  * @return void
  */
 public function handle(AboutCommand $command)
 {
     $about = About::find($command->id);
     $about->body = $command->body;
     $about->title = $command->title;
     $about->save();
 }
 /**
  * Fungsi buat tampilan about us
  */
 public function aboutUs()
 {
     $about = About::first();
     $gallery = Image::all();
     $tipe = Type::all();
     return view('FrontEnd.aboutUs', compact('about', 'gallery', 'tipe'));
 }
Beispiel #6
0
 public function store(Request $request)
 {
     $about = About::where('user_id', Auth::user()->id)->first();
     if ($about) {
         $about->hakkimda = $request->hakkimda;
         $about->save();
         flash('Güncelleme işlemi başarıyla gercekleşti.', 'info');
         return redirect()->back();
     } else {
         $about = new About();
         $about->user_id = Auth::user()->id;
         $about->hakkimda = $request->hakkimda;
         $about->save();
         flash('Güncelleme işlemi başarıyla gercekleşti.', 'info');
         return redirect()->back();
     }
 }
 public function showabout()
 {
     $about = About::findOrFail(1);
     if ($about->count() == 0) {
         abort(404);
     } else {
         return view('index.about')->withAbouts($about);
     }
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $this->validate($request, ['about' => 'required']);
     $about = About::find($id);
     $about->about = $request->get('about');
     $about->save();
     flash()->success('', 'Apie mus redaguotas!');
     return redirect()->back();
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // We want to delete the comments table if it exists before running the seed
     DB::table('about')->delete();
     $seederData = array(['text' => 'We offer you awesome tours']);
     foreach ($seederData as $item) {
         About::create($item);
     }
 }
 public function update(Request $request, About $about)
 {
     $insert = $about->fill($request->input())->save();
     $image = \Input::get('image');
     if ($image != '') {
         $imagename = 'about-' . rand(11111, 99999) . '-gudperna.png';
         $image = str_replace(' ', '+', $image);
         list($type, $image) = explode(';', $image);
         list(, $image) = explode(',', $image);
         $image = base64_decode($image);
         file_put_contents('upload/img/' . $imagename, $image);
         $about->image = $imagename;
         $about->save();
     }
     if ($insert) {
         return 0;
     } else {
         return 1;
     }
 }
 public function getAbout(Request $request)
 {
     if ($request->input('id') == null) {
         $news = News::all();
         $about = About::first();
         return view('home.about')->with(['news' => $news, 'about' => $about]);
     } else {
         $item = News::where('id', $request->input('id'))->first();
         if ($item == null) {
             return redirect('about');
         }
         return view('home.news')->with('item', $item);
     }
 }
 public function edit()
 {
     $user = User::findOrFail(Auth::user()->id);
     $entity = Entity::where('user_id', Auth::user()->id)->firstOrFail();
     $about = About::where('user_id', Auth::user()->id)->firstOrFail();
     $contact = Contact::where('user_id', Auth::user()->id)->firstOrFail();
     $home = Home::where('user_id', Auth::user()->id)->firstOrFail();
     $quote = Quote::where('user_id', Auth::user()->id)->get();
     $quote_count = $quote->count();
     $skill = Skill::where('user_id', Auth::user()->id)->get();
     $skill_count = $skill->count();
     $skill_slider = SkillSlider::where('user_id', Auth::user()->id)->get();
     $skill_slider_count = $skill_slider->count();
     $portfolio_piece = PortfolioPiece::where('user_id', Auth::user()->id)->get();
     $portfolio_piece_count = $portfolio_piece->count();
     return view('edit')->with('user', $user)->with('home', $home)->with('entity', $entity)->with('contact', $contact)->with('about', $about)->with('skill', $skill)->with('skill_count', $skill_count)->with('quote', $quote)->with('quote_count', $quote_count)->with('skill_slider', $skill_slider)->with('skill_slider_count', $skill_slider_count)->with('portfolio_piece', $portfolio_piece)->with('portfolio_piece_count', $portfolio_piece_count);
 }
 public function postabout()
 {
     $about = About::findOrFail(1);
     if ($about->count() == 0) {
         if (About::create(Input::all())) {
             return Redirect::back()->withErros(Null);
         } else {
             return Redirect::back()->withErros('Store fail!');
         }
     } else {
         $about->title = Input::get('title');
         $about->content = Input::get('content');
         if ($about->save()) {
             return Redirect::back()->withErros(Null);
         } else {
             return Redirect::back()->withErros('Store fail!');
         }
     }
 }
 public function updateAboutMe()
 {
     $user = User::find(Auth::user()->id);
     $about = About::where('user_id', Auth::user()->id)->firstOrFail();
     if (isset($user) && $about != NULL) {
         if (Input::get('about_first_title') != '') {
             $about->first_title = Input::get('about_first_title');
         }
         if (Input::get('about_first_caption') != '') {
             $about->first_caption = Input::get('about_first_caption');
         }
         if (Input::get('about_second_title') != '') {
             $about->second_title = Input::get('about_second_title');
         }
         if (Input::get('about_second_caption') != '') {
             $about->second_caption = Input::get('about_second_caption');
         }
         if (Input::get('about_third_title') != '') {
             $about->third_title = Input::get('about_third_title');
         }
         if (Input::get('about_third_caption') != '') {
             $about->third_caption = Input::get('about_third_caption');
         }
         if (Input::get('about_extra_1') != '') {
             $about->extra_1 = Input::get('about_extra_1');
         }
         if (Input::get('about_extra_2') != '') {
             $about->extra_2 = Input::get('about_extra_2');
         }
         $about->save();
         return redirect('home')->with('status', 'success');
     } else {
         return 'An error has occurred';
         //'no';
     }
 }
Beispiel #15
0
 /**
  * edit favs data.
  *
  * @param object        $request
  *
  *
  * @return json
  */
 public function editfavs(Request $request)
 {
     $email = $request->email;
     $favs = $request->favs;
     try {
         $userID = User::where('email', $email)->get(['id']);
         if (About::where('user_id', $userID[0]->id)->update(['favourites' => $favs])) {
             return response()->json(['status' => 200], 200);
         } else {
             return response()->json(['status' => 200], 200);
         }
     } catch (Illuminate\Database\QueryException $e) {
         return response()->json(['status' => 200], 200);
     }
 }
 public function index(Sitemenu $sitemenu)
 {
     $this->data['about'] = About::first();
     $this->data['meta'] = $sitemenu->getMeta('about');
     return view('pages.about.index', $this->data);
 }
Beispiel #17
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function updateDescription($id)
 {
     $user = Auth::user();
     $aboutUs = About::find($id);
     $aboutUs->detail = Input::get('detail');
     $aboutUs->save();
     $gallery = Image::all();
     return Redirect('aboutUsAdmin')->with('user', 'aboutUs', 'gallery');
 }
Beispiel #18
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     // get about
     $about = About::all();
     return $about;
 }
 public function postEditAbout(Request $request)
 {
     $validator = $this->validatorForAbout($request->all());
     if ($validator->fails()) {
         return redirect()->back()->withErrors($validator->messages())->withInput();
     }
     $about = About::first();
     $about->content = $request->input('content');
     $about->save();
     $msg = "Информация о компании изменена";
     return redirect('admin/news')->with('msg', $msg);
 }
 public function run()
 {
     DB::table('about')->delete();
     About::create(['title' => 'Photo Site', 'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quis alias rerum obcaecati itaque suscipit sequi, ipsum illum provident atque cupiditate explicabo nisi ullam veniam saepe cum cumque nam repudiandae velit? &#10 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Non iusto sed in quia blanditiis vitae fuga perspiciatis quae. Libero et adipisci voluptatem mollitia nam ipsa, voluptatum voluptate repudiandae quia, nisi.']);
 }
 public function posteditabout(Request $request)
 {
     $model_about = new About();
     $model_about->about = $request->input('about');
     $model_about->save();
 }
Beispiel #22
0
<?php

// Autoload classes \\
$_dir = rtrim(dirname(__FILE__), '\\/') . DIRECTORY_SEPARATOR;
require $_dir . '../vendor/autoload.php';
require $_dir . 'constants.php';
use App\About;
use App\PostgresDbWrapper;
use App\RegExp;
// Database connection & Required Functionality Checking \\
try {
    if (PHP_OS === 'WINNT') {
        $inipath = 'in/to ' . php_ini_loaded_file() . ' then restart ' . About::getServerSoftware();
    }
    if (About::iniGet('short_open_tag') !== true) {
        throw new Exception("Short open tags (&lt;?) are disabled\nUncomment/add the line <strong>short_open_tag=On</strong> {$inipath} to fix");
    }
    if (!function_exists('curl_init')) {
        throw new Exception("cURL extension is disabled or not installed\n" . (PHP_OS !== 'WINNT' ? "Run <strong>sudo apt-get install php7.0-curl</strong>" : "Uncomment/add the line <strong>extension=php_curl.dll</strong> {$inipath}") . ' to fix');
    }
    if (!function_exists('imagecreatefrompng')) {
        throw new Exception("GD extension is disabled or not installed" . (PHP_OS !== 'WINNT' ? "\nRun <strong>sudo apt-get install php7.0-gd</strong> to fix" : ""));
    }
    if (!class_exists('DOMDocument', false)) {
        throw new Exception("XML extension is disabled or not installed" . (PHP_OS !== 'WINNT' ? "\nRun <strong>sudo apt-get install php7.0-xml</strong> to fix" : ''));
    }
    if (!function_exists('mb_substr') || !function_exists('mb_strlen')) {
        throw new Exception("mbstring extension is disabled or not installed" . (PHP_OS !== 'WINNT' ? "\nRun <strong>sudo apt-get install php7.0-mbstring</strong> to fix" : ''));
    }
    if (!function_exists('pdo_drivers')) {
        throw new Exception("PDO extension is disabled or not installed\nThe site requires PHP 7.0+ to function, please upgrade your server.");
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     if ($about = About::whereId($id)->first()->delete()) {
         return Redirect::action('AboutController@index')->with('message', 'Descripcion eliminada.');
     } else {
         Session::flash('message', 'Algo salio mal');
         Session::flash('classMessage', 'danger');
         return Redirect::action('AboutController@index');
     }
 }
 public function about()
 {
     $about = About::first();
     $setting = Setting::first();
     return view('sites.about', compact('about', 'setting'));
 }
Beispiel #25
0
<div id="content">
	<img src="/img/logo.svg" alt="MLP Vector Club Website Logo">
	<h1><a href="http://mlp-vectorclub.deviantart.com/">MLP-VectorClub</a> Website</h1>
	<p>Handling requests, reservations & the Color Guide since 2015</p>
<?php 
use App\About;
use App\CoreUtils;
$about = file_get_contents(INCPATH . 'views/about.html');
if (!empty($about)) {
    echo str_replace(GITHUB_URL . '/blob/master/www', '', $about);
    $osver = About::getServerOS();
    $phpver = About::getPHPVersion();
    $server = About::getServerSoftware();
    $pgver = About::getPostgresVersion();
    $esver = About::getElasticSearchVersion();
    $elastic = isset($esver) ? ", ElasticSearch {$esver}" : '';
    echo <<<HTML
<strong>Server Software:</strong> {$osver}, PHP {$phpver}, {$server}, PostgreSQL {$pgver}{$elastic}<br>
</section>
HTML;
} else {
    echo CoreUtils::notice('warn', 'This section went missing due to a bug, and will be restored ASAP. Until then the section\'s contents are available at <a href="' . GITHUB_URL . '#attributions">' . GITHUB_URL . '#attributions</a>');
}
?>
	<section>
		<h2>Statistics</h2>
		<p>Here you can see various graphs about the site. The information below is cached to reduce server load, you can see when each graph was last updated below their title.</p>
		<div id="stats">
			<div class="stats-posts">
				<h3>Posts in the last 2 months</h3>
				<div class="stats-wrapper">
 public function about()
 {
     $about_model = About::all();
     return view('main.about', ['model' => $about_model]);
 }
 /**
  * returns about information
  */
 public function getAbout()
 {
     return response()->json(About::find(1));
 }
Beispiel #28
0
 public function about()
 {
     $about = \App\About::where('active', '1')->firstOrFail();
     return view('about', ['page' => 'about', 'about' => $about]);
 }
Beispiel #29
0
 /**
  * Delete the given About.
  *
  * @param  int      $id
  * @return Redirect
  */
 public function getDelete($id = null)
 {
     $about = About::destroy($id);
     // Redirect to the group management page
     return redirect('admin/abouts')->with('success', Lang::get('message.success.delete'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function index()
 {
     $about = About::first();
     return View('admin.about')->with('title', 'Edit About Page')->with('about', $about);
 }