Skip to content

Commit

Permalink
Search feature updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
SumaiyaTarannumNoor committed Aug 23, 2022
1 parent a1c32f4 commit 9dcdcac
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/PostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function updatePost(Request $request)
public function postSearch(){
$search_post = $_GET['query'];
$posts = Post::where('title', 'LIKE', '%'.$search_post.'%')->get();
$posts = Post::where('body', 'LIKE', '%'.$search_post.'%')->get();

return view('search', compact('posts'));
}
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.75",
"laravel/sanctum": "^2.11",
"laravel/socialite": "^5.5",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.4"
},
Expand Down
147 changes: 146 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],

];
11 changes: 10 additions & 1 deletion resources/views/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@
<div class="card-body" style = "border: border-box; border-radius: 5px; background-color: rgba(233, 54, 122, 0.4); margin: 10px 0; padding: 12px 6px; font-size: 28px; color: blueviolet; margin: 10px; margin-right: 30px; font-size: 20px; margin-bottom: 5px; color: blueviolet; font-weight: 400">
<form method="POST" action="{{ route('login') }}" style = "border: border-box; border-radius: 5px; background-color: rgba(233, 54, 122, 0.4); margin: 10px 0; padding: 12px 6px">
@csrf


<div class = "form-group row">
<div class="d-flex justify-content-center">
<a href="" class="btn btn-danger btn-block" style="text-align:center; background-color:green; width: 200px">Login with Google</a>
</div>
<div class="d-flex justify-content-center">
<a href="" class="btn btn-primary btn-block" style="text-align:center; width: 200px">Login with Facebook</a>
</div>
</div>
<p style="text-align: center">OR</p>
<div class="row mb-3">
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>

Expand Down

0 comments on commit 9dcdcac

Please sign in to comment.