diff --git a/app/Http/Controllers/AnswersController.php b/app/Http/Controllers/AnswersController.php index 6ecb6dec57c341b139ff052300dc6d400ce2ceb1..4aba591d9a864b252aa3d0d1f921c74f645a4dce 100644 --- a/app/Http/Controllers/AnswersController.php +++ b/app/Http/Controllers/AnswersController.php @@ -44,7 +44,7 @@ class AnswersController extends Controller $questions = Question::orderBy('created_at','desc')->paginate(15); if ($isAdmin) { - return view('admin.addanswer')->with('questions', $questions)->with('question_id', $question_id); + return view('admin.showquestion')->with('questions', $questions)->with('question_id', $question_id); } else { return view('users.qna.addanswer')->with('questions', $questions)->with('question_id', $question_id); } diff --git a/app/Http/Controllers/Auth/SocialAccountsController.php b/app/Http/Controllers/Auth/SocialAccountsController.php index 60824d19f6ac931879fad664311a5c0bad6d3ba1..6ae8b468b943913c01100d9567458e497d59b68f 100644 --- a/app/Http/Controllers/Auth/SocialAccountsController.php +++ b/app/Http/Controllers/Auth/SocialAccountsController.php @@ -38,11 +38,13 @@ class SocialAccountsController extends Controller public function handleProviderCallback(SocialAccountService $accountService, $provider) { //dd($_GET); - //dd($accountService); + //dd($accountService->user()); //dd(auth()->guard('member')->user()); - try { - $user = Socialite::with($provider)->user(); + //$user = Socialite::with($provider)->user(); + $user = Socialite::with($provider)->setHttpClient(new \GuzzleHttp\Client(['curl' => array(CURLOPT_PROXY => 'cache.itb.ac.id', CURLOPT_PROXYPORT => 8080, CURLOPT_PROXYUSERPWD => 'yowinarto:06561330', CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1_2)]))->user(); +//dd(Socialite::with($provider)->setHttpClient(new \GuzzleHttp\Client(['curl' => array(CURLOPT_PROXY => 'cache.itb.ac.id', CURLOPT_PROXYPORT => 8080, CURLOPT_PROXYUSERPWD => 'yowinarto:06561330', CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1_2 +//)]))->user()); } catch (Exception $e) { return redirect('/login'); } @@ -93,4 +95,4 @@ class SocialAccountsController extends Controller auth()->guard('member')->logout(); return redirect('/login'); } -} \ No newline at end of file +} diff --git a/app/Http/Controllers/Auth/SocialAccountsController.php.save b/app/Http/Controllers/Auth/SocialAccountsController.php.save new file mode 100644 index 0000000000000000000000000000000000000000..a9137067029b1ed22735b1cb5991fb4c60338372 --- /dev/null +++ b/app/Http/Controllers/Auth/SocialAccountsController.php.save @@ -0,0 +1,95 @@ +<?php + +namespace App\Http\Controllers\Auth; +use App\Http\Controllers\Controller; +use App\SocialAccountService; + +use Socialite; + +class SocialAccountsController extends Controller +{ + + public function __construct() + { + $this->middleware('guest:member', ['except' => ['handleProviderCallback','logout']]); + } + + + public function index() + { + return view('members.login'); + } + + /** + * Redirect the user to the Linkedin authentication page. + * + * @return \Illuminate\Http\Response + */ + public function redirectToProvider($provider) + { + return Socialite::driver($provider)->redirect(); + } + + /** + * Obtain the user information from Linkedin. + * + * @return \Illuminate\Http\Response + */ + public function handleProviderCallback(SocialAccountService $accountService, $provider) + { + //dd($_GET); + + //dd(auth()->guard('member')->user()); + try { + $user = Socialite::with($provider)->user(); + } catch (Exception $e) { + return redirect('/login'); + } + if(auth()->guard('member')->user() != null){ + if($provider == 'google'){ + $linkStatus = $accountService->editGoogleLink( + $user, + auth()->guard('member')->user() + ); + }else{ + $linkStatus = $accountService->findOrLink( + $user, + auth()->guard('member')->user(), + $provider + ); + } + if($linkStatus) + return redirect()->to('/members/'.auth()->guard('member')->user()->id)->with('success',ucfirst($provider).' account successfully linked'); + else + return redirect()->to('/members/'.auth()->guard('member')->user()->id)->with('error',ucfirst($provider).' account already linked'); + + } else { + $authUser = $accountService->findOrCreate( + $user, + $provider + ); + //dd($authUser); + switch($authUser->id){ + case -1: + return redirect()->to('/login')->with('error','Email not recorded in system'); + case -2: + return redirect()->to('/login')->with('success', 'Activation mail has been sent to your email'); + case -3: + return redirect()->to('/login')->with('error', 'Please activate your account. <a href="' . route('auth.verify.resend') . '?email=' . $user->email .'">Resend?</a>'); + default: + auth()->guard('member')->login($authUser, true); + return redirect()->to('/'); + } + } + + //auth()->guard('member')->login($authUser, true); + //dd(auth()->guard('member')->user()); + //return redirect()->to('/'); + } + + public function logout() + { + auth()->guard('member')->logout(); + return redirect('/login'); + } +} diff --git a/app/Http/Controllers/MembersController.php b/app/Http/Controllers/MembersController.php index 0338b2c905f5d333de101f1300a7de4145616d06..b4a6bb5129917a4d95f3870955d32f525912f4f7 100644 --- a/app/Http/Controllers/MembersController.php +++ b/app/Http/Controllers/MembersController.php @@ -135,13 +135,23 @@ class MembersController extends Controller if(!($isMember || $isAdmin)) return redirect('/'); - + if($isAdmin){ + $this->validate($request, [ + 'email' => + array( + 'required', + 'regex:/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}/'), + 'phone_number' => + array( + 'required', + 'regex:/^[0-9]+$/'), + 'company' => 'required', + 'interest' => 'required', + 'profile_image' => 'image|nullable|max:1999' + ]); + }else{ $this->validate($request, [ - //'email' => - // array( - // 'required', - // 'regex:/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}/'), - 'phone_number' => + 'phone_number' => array( 'required', 'regex:/^[0-9]+$/'), @@ -149,7 +159,7 @@ class MembersController extends Controller 'interest' => 'required', 'profile_image' => 'image|nullable|max:1999' ]); - + } if($request->hasFile('profile_image')){ $fileNameWithExt = $request->file('profile_image')->getClientOriginalName(); $fileName = pathinfo($fileNameWithExt, PATHINFO_FILENAME); @@ -160,7 +170,12 @@ class MembersController extends Controller } $user = Member::find($id); - //$user->temp_email = $request->input('email'); + if($isAdmin){ + $providerUser = $user->accounts()->where('provider_name','=','google')->first(); + if($providerUser != null) + $providerUser->delete(); + $user->email = $request->input('email'); + } $user->phone_number = $request->input('phone_number'); $user->company = $request->input('company'); $user->interest = $request->input('interest'); @@ -173,21 +188,7 @@ class MembersController extends Controller } $user->save(); - /*if($user->email != $user->temp_email){ - $provider = $user->accounts()->where('provider_name','=','google')->first(); - if($user->verifyToken != null) - $user->verifyToken->delete(); - - if($provider != null) - $provider->delete(); - - $token = $user->verifyToken()->create([ - 'token' => sha1(time()) - ]); - Mail::to($user)->send(new SendReverificationEmail($token)); - return redirect('/members/' . $id)->with('success', 'Profile Updated. Confirmation code has been sent to new email.'); - }else{*/ - if ($isAdmin) { + if($isAdmin){ return redirect('/admin/members/' . $id)->with('success', 'Profile Updated'); } else { return redirect('/members/' . $id)->with('success', 'Profile Updated'); @@ -210,6 +211,11 @@ class MembersController extends Controller $user = Member::find($id); if($user !== null) { + $user->accounts()->delete(); + $user->verifyToken()->delete(); + $user->rate_answers()->detach(); + $user->questions()->delete(); + $user->answers()->delete(); $user->delete(); return redirect('/admin/members')->with('error', 'Member Deleted'); } else { diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php deleted file mode 100644 index efaa21c6910c7cb0c699ebd2326e45a4153d6fc1..0000000000000000000000000000000000000000 --- a/app/Http/Controllers/UsersController.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php - -namespace App\Http\Controllers; - -use Illuminate\Http\Request; -use App\User; - -class UsersController extends Controller -{ - /** - * Display a listing of the resource. - * - * @return \Illuminate\Http\Response - */ - public function index() - { - // - } - - /** - * 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 int $id - * @return \Illuminate\Http\Response - */ - public function show($id) - { - // - } - - /** - * Show the form for editing the specified resource. - * - * @param int $id - * @return \Illuminate\Http\Response - */ - public function edit($id) - { - // - } - - /** - * Update the specified resource in storage. - * - * @param \Illuminate\Http\Request $request - * @param int $id - * @return \Illuminate\Http\Response - */ - public function update(Request $request, $id) - { - // - } - - /** - * Remove the specified resource from storage. - * - * @param int $id - * @return \Illuminate\Http\Response - */ - public function destroy($id) - { - // - } -} diff --git a/app/SocialAccountService.php b/app/SocialAccountService.php index 76a702d525e58de7e2c6f0a41e39c1adae6e29c5..5785d91788df22332f14c1b77931369c5cef3384 100644 --- a/app/SocialAccountService.php +++ b/app/SocialAccountService.php @@ -97,10 +97,12 @@ class SocialAccountService $user->id = -1; $user->verified = false; } else { + if($account == null){ $user->accounts()->create([ 'provider_id' => $providerUser->getId(), 'provider_name' => $provider, ]); + } if($provider == "google" && $user->verified == false){ $tempUser = new Member; @@ -112,7 +114,9 @@ class SocialAccountService Mail::to($user)->send(new SendVerificationEmail($token)); $tempUser->id = -2; return $tempUser; - } + }else{ + $user->verifyToken->delete(); + } $tempUser->id = -3; return $tempUser; } diff --git a/composer.lock b/composer.lock index 4a8ab37f097484db42303a9872bca1141d834c98..2bcd1398c234af708ffb9ea62aade9ba70c8943e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "049493b7ca83576c64b6849664b22c9e", + "hash": "26fe959c1d32eef303f33bebbd49df01", + "content-hash": "021fda31372ba92222b0fc90695bcfc9", "packages": [ { "name": "dnoegel/php-xdg-base-dir", @@ -37,7 +38,7 @@ "MIT" ], "description": "implementation of xdg base directory specification for php", - "time": "2014-10-24T07:27:01+00:00" + "time": "2014-10-24 07:27:01" }, { "name": "doctrine/inflector", @@ -104,7 +105,7 @@ "singularize", "string" ], - "time": "2018-01-09T20:05:19+00:00" + "time": "2018-01-09 20:05:19" }, { "name": "doctrine/lexer", @@ -158,7 +159,7 @@ "lexer", "parser" ], - "time": "2014-09-09T13:34:57+00:00" + "time": "2014-09-09 13:34:57" }, { "name": "dragonmantank/cron-expression", @@ -207,7 +208,7 @@ "cron", "schedule" ], - "time": "2018-04-06T15:51:55+00:00" + "time": "2018-04-06 15:51:55" }, { "name": "egulias/email-validator", @@ -264,7 +265,7 @@ "validation", "validator" ], - "time": "2018-04-10T10:11:19+00:00" + "time": "2018-04-10 10:11:19" }, { "name": "erusev/parsedown", @@ -310,62 +311,7 @@ "markdown", "parser" ], - "time": "2018-03-08T01:11:30+00:00" - }, - { - "name": "facebook/webdriver", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/facebook/php-webdriver.git", - "reference": "86b5ca2f67173c9d34340845dd690149c886a605" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/86b5ca2f67173c9d34340845dd690149c886a605", - "reference": "86b5ca2f67173c9d34340845dd690149c886a605", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-zip": "*", - "php": "^5.6 || ~7.0", - "symfony/process": "^2.8 || ^3.1 || ^4.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", - "guzzle/guzzle": "^3.4.1", - "php-coveralls/php-coveralls": "^1.0.2", - "php-mock/php-mock-phpunit": "^1.1", - "phpunit/phpunit": "^5.7", - "sebastian/environment": "^1.3.4 || ^2.0 || ^3.0", - "squizlabs/php_codesniffer": "^2.6", - "symfony/var-dumper": "^3.3 || ^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-community": "1.5-dev" - } - }, - "autoload": { - "psr-4": { - "Facebook\\WebDriver\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "A PHP client for Selenium WebDriver", - "homepage": "https://github.com/facebook/php-webdriver", - "keywords": [ - "facebook", - "php", - "selenium", - "webdriver" - ], - "time": "2017-11-15T11:08:09+00:00" + "time": "2018-03-08 01:11:30" }, { "name": "fideloper/proxy", @@ -419,20 +365,20 @@ "proxy", "trusted proxy" ], - "time": "2018-02-07T20:20:57+00:00" + "time": "2018-02-07 20:20:57" }, { "name": "guzzlehttp/guzzle", - "version": "6.3.2", + "version": "6.3.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90" + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/68d0ea14d5a3f42a20e87632a5f84931e2709c90", - "reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, "require": { @@ -442,7 +388,7 @@ }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", "psr/log": "^1.0" }, "suggest": { @@ -484,7 +430,7 @@ "rest", "web service" ], - "time": "2018-03-26T16:33:04+00:00" + "time": "2018-04-22 15:46:56" }, { "name": "guzzlehttp/promises", @@ -535,7 +481,7 @@ "keywords": [ "promise" ], - "time": "2016-12-20T10:07:11+00:00" + "time": "2016-12-20 10:07:11" }, { "name": "guzzlehttp/psr7", @@ -600,7 +546,7 @@ "uri", "url" ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2017-03-20 17:10:46" }, { "name": "jakub-onderka/php-console-color", @@ -643,7 +589,7 @@ "homepage": "http://www.acci.cz" } ], - "time": "2014-04-08T15:00:19+00:00" + "time": "2014-04-08 15:00:19" }, { "name": "jakub-onderka/php-console-highlighter", @@ -687,7 +633,7 @@ "homepage": "http://www.acci.cz/" } ], - "time": "2015-04-20T18:58:01+00:00" + "time": "2015-04-20 18:58:01" }, { "name": "jeremeamia/SuperClosure", @@ -745,68 +691,7 @@ "serialize", "tokenizer" ], - "time": "2018-03-21T22:21:57+00:00" - }, - { - "name": "laravel/dusk", - "version": "v3.0.7", - "source": { - "type": "git", - "url": "https://github.com/laravel/dusk.git", - "reference": "11b803060722a29cf416783e1f8dc36e5ea3fc08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/dusk/zipball/11b803060722a29cf416783e1f8dc36e5ea3fc08", - "reference": "11b803060722a29cf416783e1f8dc36e5ea3fc08", - "shasum": "" - }, - "require": { - "facebook/webdriver": "~1.0", - "illuminate/console": "~5.6", - "illuminate/support": "~5.6", - "nesbot/carbon": "~1.20", - "php": ">=7.1.0", - "symfony/console": "~4.0", - "symfony/process": "~4.0" - }, - "require-dev": { - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - }, - "laravel": { - "providers": [ - "Laravel\\Dusk\\DuskServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Laravel\\Dusk\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Laravel Dusk provides simple end-to-end testing and browser automation.", - "keywords": [ - "laravel", - "testing", - "webdriver" - ], - "time": "2018-04-04T12:32:38+00:00" + "time": "2018-03-21 22:21:57" }, { "name": "laravel/framework", @@ -945,7 +830,7 @@ "framework", "laravel" ], - "time": "2018-04-17T12:51:04+00:00" + "time": "2018-04-17 12:51:04" }, { "name": "laravel/socialite", @@ -1007,20 +892,20 @@ "laravel", "oauth" ], - "time": "2017-11-06T16:02:48+00:00" + "time": "2017-11-06 16:02:48" }, { "name": "laravel/tinker", - "version": "v1.0.5", + "version": "v1.0.6", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "94f6daf2131508cebd11cd6f8632ba586d7ecc41" + "reference": "b22fe905fcefdffae76b011e27c7ac09e07e052b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/94f6daf2131508cebd11cd6f8632ba586d7ecc41", - "reference": "94f6daf2131508cebd11cd6f8632ba586d7ecc41", + "url": "https://api.github.com/repos/laravel/tinker/zipball/b22fe905fcefdffae76b011e27c7ac09e07e052b", + "reference": "b22fe905fcefdffae76b011e27c7ac09e07e052b", "shasum": "" }, "require": { @@ -1028,7 +913,7 @@ "illuminate/contracts": "~5.1", "illuminate/support": "~5.1", "php": ">=5.5.9", - "psy/psysh": "0.7.*|0.8.*", + "psy/psysh": "0.7.*|0.8.*|0.9.*", "symfony/var-dumper": "~3.0|~4.0" }, "require-dev": { @@ -1070,7 +955,7 @@ "laravel", "psysh" ], - "time": "2018-03-06T17:34:36+00:00" + "time": "2018-04-16 12:10:37" }, { "name": "laravelcollective/html", @@ -1138,7 +1023,7 @@ ], "description": "HTML and Form Builders for the Laravel Framework", "homepage": "https://laravelcollective.com", - "time": "2018-04-09T14:09:32+00:00" + "time": "2018-04-09 14:09:32" }, { "name": "league/flysystem", @@ -1222,7 +1107,7 @@ "sftp", "storage" ], - "time": "2018-04-06T09:58:14+00:00" + "time": "2018-04-06 09:58:14" }, { "name": "league/oauth1-client", @@ -1285,7 +1170,7 @@ "tumblr", "twitter" ], - "time": "2016-08-17T00:36:58+00:00" + "time": "2016-08-17 00:36:58" }, { "name": "maatwebsite/excel", @@ -1363,7 +1248,7 @@ "import", "laravel" ], - "time": "2018-03-09T13:14:19+00:00" + "time": "2018-03-09 13:14:19" }, { "name": "monolog/monolog", @@ -1441,7 +1326,7 @@ "logging", "psr-3" ], - "time": "2017-06-19T01:22:40+00:00" + "time": "2017-06-19 01:22:40" }, { "name": "nesbot/carbon", @@ -1494,28 +1379,28 @@ "datetime", "time" ], - "time": "2018-03-19T15:50:49+00:00" + "time": "2018-03-19 15:50:49" }, { "name": "nikic/php-parser", - "version": "v3.1.5", + "version": "v4.0.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce" + "reference": "e4a54fa90a5cd8e8dd3fb4099942681731c5cdd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", - "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/e4a54fa90a5cd8e8dd3fb4099942681731c5cdd3", + "reference": "e4a54fa90a5cd8e8dd3fb4099942681731c5cdd3", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.5" + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" + "phpunit/phpunit": "^6.5 || ^7.0" }, "bin": [ "bin/php-parse" @@ -1523,7 +1408,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1545,7 +1430,7 @@ "parser", "php" ], - "time": "2018-02-28T20:30:58+00:00" + "time": "2018-03-25 17:35:16" }, { "name": "paragonie/random_compat", @@ -1593,7 +1478,7 @@ "pseudorandom", "random" ], - "time": "2018-04-04T21:24:14+00:00" + "time": "2018-04-04 21:24:14" }, { "name": "phpoffice/phpexcel", @@ -1651,7 +1536,7 @@ "xlsx" ], "abandoned": "phpoffice/phpspreadsheet", - "time": "2015-05-01T07:00:55+00:00" + "time": "2015-05-01 07:00:55" }, { "name": "psr/container", @@ -1700,7 +1585,7 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2017-02-14 16:28:37" }, { "name": "psr/http-message", @@ -1750,7 +1635,7 @@ "request", "response" ], - "time": "2016-08-06T14:39:51+00:00" + "time": "2016-08-06 14:39:51" }, { "name": "psr/log", @@ -1797,7 +1682,7 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2016-10-10 12:19:37" }, { "name": "psr/simple-cache", @@ -1845,33 +1730,33 @@ "psr-16", "simple-cache" ], - "time": "2017-10-23T01:57:42+00:00" + "time": "2017-10-23 01:57:42" }, { "name": "psy/psysh", - "version": "v0.8.18", + "version": "v0.9.3", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "5357b1cffc8fb375d6a9e3c86d5c82dd38a40834" + "reference": "79c280013cf0b30fa23f3ba8bd3649218075adf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/5357b1cffc8fb375d6a9e3c86d5c82dd38a40834", - "reference": "5357b1cffc8fb375d6a9e3c86d5c82dd38a40834", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/79c280013cf0b30fa23f3ba8bd3649218075adf4", + "reference": "79c280013cf0b30fa23f3ba8bd3649218075adf4", "shasum": "" }, "require": { "dnoegel/php-xdg-base-dir": "0.1", "jakub-onderka/php-console-highlighter": "0.3.*", - "nikic/php-parser": "~1.3|~2.0|~3.0", - "php": ">=5.3.9", + "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", + "php": ">=5.4.0", "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", "symfony/var-dumper": "~2.7|~3.0|~4.0" }, "require-dev": { - "hoa/console": "~3.16|~1.14", - "phpunit/phpunit": "^4.8.35|^5.4.3", + "hoa/console": "~2.15|~3.16", + "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0", "symfony/finder": "~2.1|~3.0|~4.0" }, "suggest": { @@ -1887,15 +1772,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.8.x-dev" + "dev-develop": "0.9.x-dev" } }, "autoload": { "files": [ - "src/Psy/functions.php" + "src/functions.php" ], "psr-4": { - "Psy\\": "src/Psy/" + "Psy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1917,7 +1802,7 @@ "interactive", "shell" ], - "time": "2018-04-02T05:41:44+00:00" + "time": "2018-04-18 12:32:50" }, { "name": "ramsey/uuid", @@ -1997,7 +1882,7 @@ "identifier", "uuid" ], - "time": "2018-01-20T00:28:24+00:00" + "time": "2018-01-20 00:28:24" }, { "name": "swiftmailer/swiftmailer", @@ -2052,7 +1937,7 @@ "mail", "mailer" ], - "time": "2017-09-30T22:39:41+00:00" + "time": "2017-09-30 22:39:41" }, { "name": "symfony/console", @@ -2120,7 +2005,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" + "time": "2018-04-03 05:24:00" }, { "name": "symfony/css-selector", @@ -2173,7 +2058,7 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2018-03-19T22:35:49+00:00" + "time": "2018-03-19 22:35:49" }, { "name": "symfony/debug", @@ -2229,7 +2114,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" + "time": "2018-04-03 05:24:00" }, { "name": "symfony/event-dispatcher", @@ -2292,7 +2177,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-04-06T07:35:43+00:00" + "time": "2018-04-06 07:35:43" }, { "name": "symfony/finder", @@ -2341,7 +2226,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-04-04T05:10:37+00:00" + "time": "2018-04-04 05:10:37" }, { "name": "symfony/http-foundation", @@ -2394,7 +2279,7 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" + "time": "2018-04-03 05:24:00" }, { "name": "symfony/http-kernel", @@ -2480,7 +2365,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2018-04-06T16:25:03+00:00" + "time": "2018-04-06 16:25:03" }, { "name": "symfony/polyfill-mbstring", @@ -2539,7 +2424,7 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-01-30 19:27:44" }, { "name": "symfony/polyfill-php56", @@ -2595,7 +2480,7 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-01-30 19:27:44" }, { "name": "symfony/polyfill-php72", @@ -2650,7 +2535,7 @@ "portable", "shim" ], - "time": "2018-01-31T17:43:24+00:00" + "time": "2018-01-31 17:43:24" }, { "name": "symfony/polyfill-util", @@ -2702,7 +2587,7 @@ "polyfill", "shim" ], - "time": "2018-01-31T18:08:44+00:00" + "time": "2018-01-31 18:08:44" }, { "name": "symfony/process", @@ -2751,7 +2636,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" + "time": "2018-04-03 05:24:00" }, { "name": "symfony/routing", @@ -2829,7 +2714,7 @@ "uri", "url" ], - "time": "2018-04-04T13:50:32+00:00" + "time": "2018-04-04 13:50:32" }, { "name": "symfony/translation", @@ -2897,7 +2782,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2018-02-22T10:50:29+00:00" + "time": "2018-02-22 10:50:29" }, { "name": "symfony/var-dumper", @@ -2966,7 +2851,7 @@ "debug", "dump" ], - "time": "2018-04-04T05:10:37+00:00" + "time": "2018-04-04 05:10:37" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -3013,7 +2898,7 @@ ], "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", - "time": "2017-11-27T11:13:29+00:00" + "time": "2017-11-27 11:13:29" }, { "name": "unisharp/laravel-ckeditor", @@ -3067,7 +2952,7 @@ "text", "wysiwyg" ], - "time": "2017-11-01T04:33:40+00:00" + "time": "2017-11-01 04:33:40" }, { "name": "vlucas/phpdotenv", @@ -3117,7 +3002,7 @@ "env", "environment" ], - "time": "2016-09-01T10:05:43+00:00" + "time": "2016-09-01 10:05:43" } ], "packages-dev": [ @@ -3173,7 +3058,7 @@ "constructor", "instantiate" ], - "time": "2017-07-22T11:58:36+00:00" + "time": "2017-07-22 11:58:36" }, { "name": "filp/whoops", @@ -3234,7 +3119,7 @@ "throwable", "whoops" ], - "time": "2017-11-23T18:22:44+00:00" + "time": "2017-11-23 18:22:44" }, { "name": "fzaninotto/faker", @@ -3284,7 +3169,7 @@ "faker", "fixtures" ], - "time": "2017-08-15T16:48:10+00:00" + "time": "2017-08-15 16:48:10" }, { "name": "hamcrest/hamcrest-php", @@ -3332,7 +3217,7 @@ "keywords": [ "test" ], - "time": "2016-01-20T08:20:44+00:00" + "time": "2016-01-20 08:20:44" }, { "name": "laravel/browser-kit-testing", @@ -3380,7 +3265,7 @@ "laravel", "testing" ], - "time": "2018-03-13T18:07:36+00:00" + "time": "2018-03-13 18:07:36" }, { "name": "mockery/mockery", @@ -3445,7 +3330,7 @@ "test double", "testing" ], - "time": "2017-10-06T16:20:43+00:00" + "time": "2017-10-06 16:20:43" }, { "name": "myclabs/deep-copy", @@ -3490,7 +3375,7 @@ "object", "object graph" ], - "time": "2017-10-19T19:58:43+00:00" + "time": "2017-10-19 19:58:43" }, { "name": "nunomaduro/collision", @@ -3551,7 +3436,7 @@ "php", "symfony" ], - "time": "2018-02-07T10:42:20+00:00" + "time": "2018-02-07 10:42:20" }, { "name": "phar-io/manifest", @@ -3606,7 +3491,7 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" + "time": "2017-03-05 18:14:27" }, { "name": "phar-io/version", @@ -3653,7 +3538,7 @@ } ], "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "time": "2017-03-05 17:38:23" }, { "name": "phpdocumentor/reflection-common", @@ -3707,7 +3592,7 @@ "reflection", "static analysis" ], - "time": "2017-09-11T18:02:19+00:00" + "time": "2017-09-11 18:02:19" }, { "name": "phpdocumentor/reflection-docblock", @@ -3758,7 +3643,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" + "time": "2017-11-30 07:14:17" }, { "name": "phpdocumentor/type-resolver", @@ -3805,27 +3690,27 @@ "email": "me@mikevanriel.com" } ], - "time": "2017-07-14T14:27:02+00:00" + "time": "2017-07-14 14:27:02" }, { "name": "phpspec/prophecy", - "version": "1.7.5", + "version": "1.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { @@ -3868,7 +3753,7 @@ "spy", "stub" ], - "time": "2018-02-19T10:16:54+00:00" + "time": "2018-04-18 13:57:24" }, { "name": "phpunit/php-code-coverage", @@ -3931,7 +3816,7 @@ "testing", "xunit" ], - "time": "2018-04-06T15:39:20+00:00" + "time": "2018-04-06 15:39:20" }, { "name": "phpunit/php-file-iterator", @@ -3978,7 +3863,7 @@ "filesystem", "iterator" ], - "time": "2017-11-27T13:52:08+00:00" + "time": "2017-11-27 13:52:08" }, { "name": "phpunit/php-text-template", @@ -4019,7 +3904,7 @@ "keywords": [ "template" ], - "time": "2015-06-21T13:50:34+00:00" + "time": "2015-06-21 13:50:34" }, { "name": "phpunit/php-timer", @@ -4068,7 +3953,7 @@ "keywords": [ "timer" ], - "time": "2018-02-01T13:07:23+00:00" + "time": "2018-02-01 13:07:23" }, { "name": "phpunit/php-token-stream", @@ -4117,20 +4002,20 @@ "keywords": [ "tokenizer" ], - "time": "2018-02-01T13:16:43+00:00" + "time": "2018-02-01 13:16:43" }, { "name": "phpunit/phpunit", - "version": "7.1.3", + "version": "7.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a7834993ddbf4b0ed2c3b2dc1f3b1d093ef910a9" + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a7834993ddbf4b0ed2c3b2dc1f3b1d093ef910a9", - "reference": "a7834993ddbf4b0ed2c3b2dc1f3b1d093ef910a9", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6d51299e307dc510149e0b7cd1931dd11770e1cb", + "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb", "shasum": "" }, "require": { @@ -4149,7 +4034,7 @@ "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.0", "phpunit/phpunit-mock-objects": "^6.1.1", - "sebastian/comparator": "^2.1", + "sebastian/comparator": "^2.1 || ^3.0", "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", @@ -4197,7 +4082,7 @@ "testing", "xunit" ], - "time": "2018-04-13T02:28:50+00:00" + "time": "2018-04-18 13:41:53" }, { "name": "phpunit/phpunit-mock-objects", @@ -4253,7 +4138,7 @@ "mock", "xunit" ], - "time": "2018-04-11T04:50:36+00:00" + "time": "2018-04-11 04:50:36" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4298,34 +4183,34 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "time": "2017-03-04 06:30:41" }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5", + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": "^7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4362,7 +4247,7 @@ "compare", "equality" ], - "time": "2018-02-01T13:46:46+00:00" + "time": "2018-04-18 13:33:00" }, { "name": "sebastian/diff", @@ -4418,7 +4303,7 @@ "unidiff", "unified diff" ], - "time": "2018-02-01T13:45:15+00:00" + "time": "2018-02-01 13:45:15" }, { "name": "sebastian/environment", @@ -4468,7 +4353,7 @@ "environment", "hhvm" ], - "time": "2017-07-01T08:51:00+00:00" + "time": "2017-07-01 08:51:00" }, { "name": "sebastian/exporter", @@ -4535,7 +4420,7 @@ "export", "exporter" ], - "time": "2017-04-03T13:19:02+00:00" + "time": "2017-04-03 13:19:02" }, { "name": "sebastian/global-state", @@ -4586,7 +4471,7 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2017-04-27 15:39:26" }, { "name": "sebastian/object-enumerator", @@ -4633,7 +4518,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "time": "2017-08-03 12:35:26" }, { "name": "sebastian/object-reflector", @@ -4678,7 +4563,7 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "time": "2017-03-29 09:07:27" }, { "name": "sebastian/recursion-context", @@ -4731,7 +4616,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "time": "2017-03-03 06:23:57" }, { "name": "sebastian/resource-operations", @@ -4773,7 +4658,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "time": "2015-07-28 20:34:47" }, { "name": "sebastian/version", @@ -4816,7 +4701,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "time": "2016-10-03 07:35:21" }, { "name": "symfony/dom-crawler", @@ -4872,7 +4757,7 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2018-03-19T22:35:49+00:00" + "time": "2018-03-19 22:35:49" }, { "name": "symfony/thanks", @@ -4915,7 +4800,7 @@ } ], "description": "Give thanks (in the form of a GitHub â) to your fellow PHP package maintainers (not limited to Symfony components)!", - "time": "2018-03-14T21:51:39+00:00" + "time": "2018-03-14 21:51:39" }, { "name": "theseer/tokenizer", @@ -4955,7 +4840,7 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" + "time": "2017-04-07 12:08:54" }, { "name": "webmozart/assert", @@ -5005,7 +4890,7 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2018-01-29 19:49:41" } ], "aliases": [], diff --git a/config/services.php b/config/services.php index 44cd18d74cd03cdf7ad46504ddf53543f25c1534..d4cf769fc3b2809ca540848a74178153ff89c321 100644 --- a/config/services.php +++ b/config/services.php @@ -36,19 +36,19 @@ return [ ], 'linkedin' => [ - 'client_id' => env('LINKEDIN_CLIENT_ID'), + 'client_id' => env('LINKEDIN_CLIENT_ID'), 'client_secret' => env('LINKEDIN_CLIENT_SECRET'), 'redirect' => env('LINKEDIN_URL'), ], 'facebook' => [ - 'client_id' => env('FACEBOOK_CLIENT_ID'), + 'client_id' => env('FACEBOOK_CLIENT_ID'), 'client_secret' => env('FACEBOOK_CLIENT_SECRET'), 'redirect' => env('FACEBOOK_URL'), ], 'google' => [ - 'client_id' => env('GOOGLE_CLIENT_ID'), + 'client_id' => env('GOOGLE_CLIENT_ID'), 'client_secret' => env('GOOGLE_CLIENT_SECRET'), 'redirect' => env('GOOGLE_URL'), ], diff --git a/public/storage/cover_images/default_1524675461.png b/public/storage/cover_images/default_1524675461.png deleted file mode 100644 index c1c215cc6e9ab2cfd70254373103c3c9cb055bce..0000000000000000000000000000000000000000 Binary files a/public/storage/cover_images/default_1524675461.png and /dev/null differ diff --git a/public/storage/profile_image/noimage_1524676318.jpg b/public/storage/profile_image/noimage_1524676318.jpg deleted file mode 100644 index bed17c901e5fcdca78e6d892fdcd7c07b4b4bdb4..0000000000000000000000000000000000000000 Binary files a/public/storage/profile_image/noimage_1524676318.jpg and /dev/null differ diff --git a/public/storage/view-more-members.png b/public/storage/view-more-members.png deleted file mode 100644 index 74ab2b6ad26192f1f62db094ac4f51cff382b8e5..0000000000000000000000000000000000000000 Binary files a/public/storage/view-more-members.png and /dev/null differ diff --git a/resources/views/admin/addanswer.blade.php b/resources/views/admin/addanswer.blade.php deleted file mode 100644 index 7b1034c78745b84a7218be6d975e30599e992c70..0000000000000000000000000000000000000000 --- a/resources/views/admin/addanswer.blade.php +++ /dev/null @@ -1,77 +0,0 @@ -@extends('layouts.app') - -@section('title', 'Questions') - -@section('content') - -@include('inc.adminmenu') - <main role="main" class="col-7"> - <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3 border-bottom"> - <h1 class="h2">List of Questions</h1> - </div> - @if (count($questions) > 0) - @foreach ($questions as $question) - <div class="well"> - <div class="row"> - <div class="col-12 post-card"> - <h3><a href="/admin/questions/{{$question->id}}">{{$question->topic}}</a></h3> - <p>{{$question->body}}</p> - <small><i>Written on {{$question->created_at}} by {{$question->user->name}}</i></small><br> - <a href="/admin/answers/add/{{$question->id}}" class="btn btn-primary" style="float:right;"> - Give Answer - </a> - </div> - - @foreach ($question->answers->sortByDesc('rating') as $answer) - <div class="col-12 post-card" style="display:inline;"> - <hr> - <div class="col-10" style="float:left;"> - <p>{{$answer->body}}</p> - <a href="/admin/answers/{{$answer->id}}"><small>Written on {{$answer->created_at}} by {{$answer->user->name}}</small></a><br> - @if ($answer->created_at != $answer->updated_at) - <small style="color:green;">(edited)</small> - @endif - </div> - <div class="col-2 pull-right"> - <center><h2>{{$answer->rating}}</h2></center> - {!! Form::open(['action' => ['AnswersController@giveRating', $answer->id, Auth::user()->id], 'method' => 'POST']) !!} - - @if ($answer->users->contains(Auth::user()->id)) - {{Form::submit('VOTE', ['class' => 'btn'])}} - @else - {{Form::submit('VOTE', ['class' => 'btn btn-warning'])}} - @endif - - {!! Form::close() !!} - </div> - </div> - @endforeach - - @if ($question->id == $question_id) - <div class="col-12 post-card"> - <hr> - {!! Form::open(['action' => ['AnswersController@store'], 'method' => 'POST']) !!} - <div class="form-group"> - {{Form::label('body','Answer')}} - {{Form::text('body', '', ['class' => 'form-control'])}} - </div> - {{ Form::hidden('question_id', $question->id) }} - {{Form::submit('Submit', ['class' => 'btn btn-primary'])}} - <a onclick="return confirm('Are you sure you want to cancel?')" href="/admin/questions" class="btn btn-danger pull-right">Cancel</a> - {!! Form::close() !!} - </div> - @endif - </div> - </div> - @endforeach - <ul class="pagination pull-right">{{$questions->links()}}</ul> - @else - <p>No question</p> - @endif - </main> - -<script> - document.getElementById("nav-four").classList.add("active"); - document.getElementById("text-nav-four").classList.add("color-active"); -</script> -@endsection \ No newline at end of file diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index 97cc436bda4ceeaac745cea8dc70e8caeb48f9c8..9e9e7f7274d98da9290058fe1a66f0ecd2f9a677 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -19,9 +19,6 @@ </div> </div> - <!-- Bootstrap core JavaScript - ================================================== --> - <!-- Placed at the end of the document so the pages load faster --> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script>window.jQuery || document.write('<script src="../../../../assets/js/vendor/jquery-slim.min.js"><\/script>')</script> <script src="../../../../assets/js/vendor/popper.min.js"></script> diff --git a/resources/views/admin/editprofile.blade.php b/resources/views/admin/editprofile.blade.php index 73fb52f7cbeadcb02902885bbb34e466923b0e17..5cabf0f4e1da5399584b8fa197dabdb303e879c9 100644 --- a/resources/views/admin/editprofile.blade.php +++ b/resources/views/admin/editprofile.blade.php @@ -26,6 +26,13 @@ <br> </td> </tr> + <tr> + <td>Email</td> + <td> + {{Form::text('email', $user->email, ['class' => 'form-control'])}} + </td> + </tr> + <tr> <td>Phone Number</td> <td> diff --git a/resources/views/admin/profile.blade.php b/resources/views/admin/profile.blade.php index c81d12e9c81e0c9c1081efdb3836e8f23a1015b5..dae0c50acbd3cef4f2d432dc158ca4e1edabe892 100644 --- a/resources/views/admin/profile.blade.php +++ b/resources/views/admin/profile.blade.php @@ -23,10 +23,10 @@ <td>Name</td> <td>{{$user->name}}</td> </tr> - <!--<tr> + <tr> <td>Email</td> - <td><a href="mailto:{{$user->email}}">{{$user->email}}</a></td> - </tr>--> + <td>{{$user->email}}</td> + </tr> <tr> <td>Phone Number</td> <td>{{$user->phone_number}} @@ -238,4 +238,4 @@ </section> </div> @endif -@endsection \ No newline at end of file +@endsection diff --git a/resources/views/admin/showeachpost.blade.php b/resources/views/admin/showeachpost.blade.php index ee9789e62e4a8070ef76467f632665fbee5d596d..dc5ad7d8bf567e1a29531b461a749445b4c66a8e 100644 --- a/resources/views/admin/showeachpost.blade.php +++ b/resources/views/admin/showeachpost.blade.php @@ -42,8 +42,6 @@ {{Form::submit('Delete', ['class' => 'btn btn-danger', 'onclick' => "return confirm('Are you sure you want to delete?')"])}} {!!Form::close() !!} @endif - <!--<br><br><br> - <a href="/admin/posts" class="btn btn-info pull-down">← Back</a>--> </div> @endsection \ No newline at end of file diff --git a/resources/views/admin/showquestion.blade.php b/resources/views/admin/showquestion.blade.php index 79dfc498616e05f68788d00ec2c0c0fc9d6c0073..57a72b70b740c27c4b48b4e6c107734762b587cc 100644 --- a/resources/views/admin/showquestion.blade.php +++ b/resources/views/admin/showquestion.blade.php @@ -121,7 +121,6 @@ document.getElementById("text-nav-four").classList.add("color-active"); $("div[id^='answers']").hide(); - //$("div[id^='answercontainer']").hide(); $(document).ready(function() { $("input[id^='btn']" ).click(function() { @@ -137,7 +136,6 @@ } else if ($('#btn-' + question_id).hasClass('hidden-button')) { $('#answers-' + question_id).show(); - //$('#answercontainer-' + classname).show(); var top = $('#answercontainer-' + question_id).position().top; $('html').scrollTop(top); diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 66a5c43424ad67f7c09efa9ebc8378be9574b43a..e1248f03c74ac10f0138f3cb94d1a56e444e4cf6 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -314,44 +314,6 @@ </div> </div> @endif - - {{-- @if (count($homedata[1]) > 3) - <div class="team-member"> - <img src="/storage/profile_image/{{$homedata[1][3]->profile_image}}" class="img-responsive" alt=""> - <div class="team-details"> - <h4>{{$homedata[1][3]->name}}</h4> - <p>Alumni of STEI ITB</p> - <ul> - @if ((Auth::user() != null) || (Auth::guard('member')->user() != null)) - <li><a href="/members/{{$homedata[1][3]->id}}"><i class="fa fa-user"></i></a></li> - @else - <li class="popup" onclick="myFunction4()"> - <span class="popuptext" id="myPopup4">You must login first <a href="/login"><u>(LOGIN)</u></a></span> - <i class="fa fa-user show-profile-icon-team-details"></i></li> - @endif - </ul> - </div> - </div> - @endif - - @if (count($homedata[1]) > 4) - <div class="team-member"> - <img src="/storage/profile_image/{{$homedata[1][4]->profile_image}}" class="img-responsive" alt=""> - <div class="team-details"> - <h4>{{$homedata[1][4]->name}}</h4> - <p>Alumni of STEI ITB</p> - <ul> - @if ((Auth::user() != null) || (Auth::guard('member')->user() != null)) - <li><a href="/members/{{$homedata[1][4]->id}}"><i class="fa fa-user"></i></a></li> - @else - <li class="popup" onclick="myFunction5()"> - <span class="popuptext" id="myPopup5">You must login first <a href="/login"><u>(LOGIN)</u></a></span> - <i class="fa fa-user show-profile-icon-team-details"></i></li> - @endif - </ul> - </div> - </div> - @endif --}} <div class="team-member"> <img src="/storage/view-more-members.jpg" class="img-responsive" alt=""> @@ -385,8 +347,7 @@ <div class="row"> <div class="col-lg-12"> <div class="section-title text-center"> - <h3>Contact With Us</h3> - <h5 class="white-text lowercase"><strong>sisfo@std.stei.itb.ac.id</strong></h5> + <h3>Contact Us</h3> </div> </div> </div> diff --git a/resources/views/inc/adminmenu.blade.php b/resources/views/inc/adminmenu.blade.php index 31fb60395dcdb99f213eacb0a73a8789f11cbce0..04cd831b7ed5414fde1434e9805d60d29cf5dfc5 100644 --- a/resources/views/inc/adminmenu.blade.php +++ b/resources/views/inc/adminmenu.blade.php @@ -38,8 +38,6 @@ </ul> </div> </nav> - <!-- Icons --> - <!--<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>--> <script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script> <script> feather.replace(); diff --git a/resources/views/inc/navbarhome.blade.php b/resources/views/inc/navbarhome.blade.php index 01c04328a27e23959d0214b92aae89ff8876eecd..75e151b623eea73440ae26f765594eb1be6b35ff 100644 --- a/resources/views/inc/navbarhome.blade.php +++ b/resources/views/inc/navbarhome.blade.php @@ -8,7 +8,7 @@ <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header page-scroll"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> - <span class="sr-only">Toggle navigation</span + <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> @@ -23,50 +23,74 @@ <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> - <ul class="nav navbar-nav navbar-left"> - <li class="hidden"> + <!--<li class="hidden"> <a href="#page-top"></a> - </li> + </li>--> @if(Request::is('/')) - <li class="on-page" id="home-navbar"> - <a class="dropdown-toggle" data-toggle="dropdown" href="/" style="color:white">Home - <span class="caret"></span></a> - <ul class="dropdown-menu"> - <li class="dropdown-home"> - <a class="page-scroll" href="#page-top">Introduction</a> - </li> - <li class="dropdown-home"> - <a class="page-scroll" href="#service">Services</a> - </li> - <li class="dropdown-home"> - <a class="page-scroll" href="#team">New Member</a> - </li> - <li class="dropdown-home"> - <a class="page-scroll" href="#contact">Contact</a> - </li> - </ul> - </li> + <div class="navbar-nav ml-auto nav navbar-left"> + <li class="nav-item dropdown" style=""> + <a id="navbarDropdown login-dropdown" class="nav-link dropdown-toggle login" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre> + <span>Home</span> + </a> + + <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> + <li> + <a class="dropdown-item page-scroll" href="#page-top"> + Introduction + </a> + </li> + <li> + <a class="dropdown-item page-scroll" href="#service"> + Services + </a> + </li> + <li> + <a class="dropdown-item page-scroll" href="#team"> + New Member + </a> + </li> + <li> + <a class="dropdown-item page-scroll" href="#contact"> + Contact + </a> + </li> + </ul> + </li> + </div> @else - <li> - <a class="dropdown-toggle" data-toggle="dropdown" href="/">Home - <span class="caret"></span></a> - <ul class="dropdown-menu"> - <li class="dropdown-home"> - <a class="page-scroll on-page" href="/#page-top">Introduction</a> - </li> - <li class="dropdown-home"> - <a class="page-scroll" href="/#service">Services</a> - </li> - <li class="dropdown-home"> - <a class="page-scroll" href="/#team">New Member</a> - </li> - <li class="dropdown-home"> - <a class="page-scroll" href="/#contact">Contact</a> - </li> - </ul> - </li> + <div class="navbar-nav ml-auto nav navbar-left"> + <li class="nav-item dropdown" style=""> + <a id="navbarDropdown login-dropdown" class="nav-link dropdown-toggle login" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre> + <span>Home</span> + </a> + + <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> + <li> + <a class="dropdown-item page-scroll" href="/#page-top"> + Introduction + </a> + </li> + <li> + <a class="dropdown-item page-scroll" href="/#service"> + Services + </a> + </li> + <li> + <a class="dropdown-item page-scroll" href="/#team"> + New Member + </a> + </li> + <li> + <a class="dropdown-item page-scroll" href="/#contact"> + Contact + </a> + </li> + </ul> + </li> + </div> @endif + <ul class="nav navbar-nav navbar-left"> @if(Request::is('article')) <li class="on-page"> <a href="#">Article</a> @@ -79,7 +103,7 @@ {{-- Forum --}} @if(Auth::guard('member')->user() != null) - @if(Request::is('questions')) <!-- URL Forum --> + @if(Request::is('questions')) <li class="on-page"> <a href="#">Forum</a> </li> @@ -128,7 +152,6 @@ <ul class="dropdown-menu" aria-labelledby="navbarDropdown"> <li> <a class="dropdown-item" href="/members/{{Auth::guard('member')->user()->id}}"> - {{-- <a class="dropdown-item" href="/profilemember/{{Auth::guard('member')->user()->id}}"> --}} Profile </a> </li> diff --git a/resources/views/showmember.blade.php b/resources/views/showmember.blade.php index 2b47f704df63602c1ecaa1c401ae4e12bd6a0995..791ce44dcd5ef232ec3cb1edf68a0bcf4ed27a10 100644 --- a/resources/views/showmember.blade.php +++ b/resources/views/showmember.blade.php @@ -3,9 +3,6 @@ @section('title', 'Members List') @section('content') -<!--<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3 border-bottom"> - <img src="{{URL::asset('storage/banner.jpg')}}" id="bannerMember"> -</div>--> <div class="col-10 col-xs-offset-1 col-sm-offset-1 col-md-offset-1 showmember-table" style="min-height: 60em; overflow-x: auto"> <div class="row" style="margin-top: 1%"> <div class="col-md-12 col-sm-12">