changes
@ -41,7 +41,8 @@ class NewsController extends Controller
|
|||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
// dd($request->all());
|
dd($request->all());
|
||||||
|
$status = $request->input('status');
|
||||||
$isFeatured = $request->input('featured_news');
|
$isFeatured = $request->input('featured_news');
|
||||||
createActivityLog(NewsController::class, 'store', ' News store');
|
createActivityLog(NewsController::class, 'store', ' News store');
|
||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
@ -68,6 +69,11 @@ class NewsController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$requestData['featured_news'] = 'False';
|
$requestData['featured_news'] = 'False';
|
||||||
}
|
}
|
||||||
|
if($status){
|
||||||
|
$requestData['status'] = 1;
|
||||||
|
}else{
|
||||||
|
$requestData['status'] = 0;
|
||||||
|
}
|
||||||
array_walk_recursive($requestData, function (&$value) {
|
array_walk_recursive($requestData, function (&$value) {
|
||||||
$value = str_replace(env('APP_URL') . '/', '', $value);
|
$value = str_replace(env('APP_URL') . '/', '', $value);
|
||||||
});
|
});
|
||||||
@ -136,6 +142,7 @@ class NewsController extends Controller
|
|||||||
|
|
||||||
public function update(Request $request, $id)
|
public function update(Request $request, $id)
|
||||||
{
|
{
|
||||||
|
$status = $request->input('status');
|
||||||
$isFeatured = $request->input('featured_news');
|
$isFeatured = $request->input('featured_news');
|
||||||
|
|
||||||
createActivityLog(NewsController::class, 'update', ' News update');
|
createActivityLog(NewsController::class, 'update', ' News update');
|
||||||
@ -159,6 +166,11 @@ class NewsController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$filterData['featured_news'] = 'False';
|
$filterData['featured_news'] = 'False';
|
||||||
}
|
}
|
||||||
|
if($status){
|
||||||
|
$filterData['status'] = 1;
|
||||||
|
}else{
|
||||||
|
$filterData['status'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
array_walk_recursive($filterData, function (&$value) {
|
array_walk_recursive($filterData, function (&$value) {
|
||||||
$value = str_replace(env('APP_URL') . '/', '', $value);
|
$value = str_replace(env('APP_URL') . '/', '', $value);
|
||||||
|
181
app/Http/Controllers/PopupsController.php
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Repositories\PopupRepository;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models\Popups;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use App\Service\CommonModelService;
|
||||||
|
use Log;
|
||||||
|
use Exception;
|
||||||
|
|
||||||
|
class PopupsController extends Controller
|
||||||
|
{
|
||||||
|
protected $modelService;
|
||||||
|
protected $popupRepository;
|
||||||
|
public function __construct(Popups $model, PopupRepository $popupRepository)
|
||||||
|
{
|
||||||
|
$this->modelService = new CommonModelService($model);
|
||||||
|
$this->popupRepository = $popupRepository;
|
||||||
|
}
|
||||||
|
public function index(Request $request)
|
||||||
|
{
|
||||||
|
createActivityLog(PopupsController::class, 'index', ' Popups index');
|
||||||
|
$data = Popups::where('status', '<>', -1)->orderBy('display_order')->get();
|
||||||
|
|
||||||
|
return view("crud.generated.popups.index", compact('data'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create(Request $request)
|
||||||
|
{
|
||||||
|
createActivityLog(PopupsController::class, 'create', ' Popups create');
|
||||||
|
$TableData = Popups::where('status', '<>', -1)->orderBy('display_order')->get();
|
||||||
|
return view("crud.generated.popups.create", compact('TableData'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
createActivityLog(PopupsController::class, 'store', ' Popups store');
|
||||||
|
$validator = Validator::make($request->all(), [
|
||||||
|
//ADD REQUIRED FIELDS FOR VALIDATION
|
||||||
|
]);
|
||||||
|
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return response()->json([
|
||||||
|
'error' => $validator->errors(),
|
||||||
|
], 500);
|
||||||
|
}
|
||||||
|
$request->request->add(['display_order' => getDisplayOrder('tbl_popups')]);
|
||||||
|
$requestData = $request->all();
|
||||||
|
array_walk_recursive($requestData, function (&$value) {
|
||||||
|
$value = str_replace(env('APP_URL') . '/', '', $value);
|
||||||
|
});
|
||||||
|
array_walk_recursive($requestData, function (&$value) {
|
||||||
|
$value = str_replace(env('APP_URL'), '', $value);
|
||||||
|
});
|
||||||
|
$requestData['createdBy'] = auth()->user()->id;
|
||||||
|
$requestData['updatedBy'] = auth()->user()->id;
|
||||||
|
|
||||||
|
$this->popupRepository->create($requestData);
|
||||||
|
if ($request->ajax()) {
|
||||||
|
return response()->json(['status' => true, 'message' => 'The Popups Created Successfully.'], 200);
|
||||||
|
}
|
||||||
|
return redirect()->route('popups.index')->with('success', 'The Popups created Successfully.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function sort(Request $request)
|
||||||
|
{
|
||||||
|
$idOrder = $request->input('id_order');
|
||||||
|
|
||||||
|
foreach ($idOrder as $index => $id) {
|
||||||
|
$companyArticle = Popups::find($id);
|
||||||
|
$companyArticle->display_order = $index + 1;
|
||||||
|
$companyArticle->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json(['status' => true, 'content' => 'The articles sorted successfully.'], 200);
|
||||||
|
}
|
||||||
|
public function updatealias(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
$articleId = $request->input('articleId');
|
||||||
|
$newAlias = $request->input('newAlias');
|
||||||
|
$companyArticle = Popups::find($articleId);
|
||||||
|
if (!$companyArticle) {
|
||||||
|
return response()->json(['status' => false, 'content' => 'Company article not found.'], 404);
|
||||||
|
}
|
||||||
|
$companyArticle->alias = $newAlias;
|
||||||
|
$companyArticle->save();
|
||||||
|
return response()->json(['status' => true, 'content' => 'Alias updated successfully.'], 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function show(Request $request, $id)
|
||||||
|
{
|
||||||
|
createActivityLog(PopupsController::class, 'show', ' Popups show');
|
||||||
|
$data = Popups::findOrFail($id);
|
||||||
|
|
||||||
|
return view("crud.generated.popups.show", compact('data'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function edit(Request $request, $id)
|
||||||
|
{
|
||||||
|
createActivityLog(PopupsController::class, 'edit', ' Popups edit');
|
||||||
|
$TableData = Popups::where('status', '<>', -1)->orderBy('display_order')->get();
|
||||||
|
$data = Popups::findOrFail($id);
|
||||||
|
if ($request->ajax()) {
|
||||||
|
$html = view("crud.generated.popups.ajax.edit", compact('data'))->render();
|
||||||
|
return response()->json(['status' => true, 'content' => $html], 200);
|
||||||
|
}
|
||||||
|
return view("crud.generated.popups.edit", compact('data', 'TableData'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
createActivityLog(PopupsController::class, 'update', ' Popups update');
|
||||||
|
$validator = Validator::make($request->all(), [
|
||||||
|
//ADD VALIDATION FOR REQIRED FIELDS
|
||||||
|
]);
|
||||||
|
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return response()->json([
|
||||||
|
'error' => $validator->errors(),
|
||||||
|
], 500);
|
||||||
|
}
|
||||||
|
$filterData = $request->except(['_method','_token']);
|
||||||
|
array_walk_recursive($filterData, function (&$value) {
|
||||||
|
$value = str_replace(env('APP_URL') . '/', '', $value);
|
||||||
|
});
|
||||||
|
array_walk_recursive($filterData, function (&$value) {
|
||||||
|
$value = str_replace(env('APP_URL'), '', $value);
|
||||||
|
});
|
||||||
|
$this->popupRepository->update($id, $filterData);
|
||||||
|
if ($request->ajax()) {
|
||||||
|
return response()->json(['status' => true, 'message' => 'The Popups updated Successfully.'], 200);
|
||||||
|
}
|
||||||
|
// return redirect()->route('popups.index')->with('success','The Popups updated Successfully.');
|
||||||
|
return redirect()->route('popups.index')->with('success', 'The Popups updated successfully.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy(Request $request, $id)
|
||||||
|
{
|
||||||
|
createActivityLog(PopupsController::class, 'destroy', ' Popups destroy');
|
||||||
|
DB::beginTransaction();
|
||||||
|
try {
|
||||||
|
$OperationNumber = getOperationNumber();
|
||||||
|
$this->modelService->destroy($OperationNumber, $OperationNumber, $id);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
DB::rollBack();
|
||||||
|
Log::info($e->getMessage());
|
||||||
|
createErrorLog(PopupsController::class, 'destroy', $e->getMessage());
|
||||||
|
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
|
||||||
|
}
|
||||||
|
DB::commit();
|
||||||
|
return response()->json(['status' => true, 'message' => 'The Popups Deleted Successfully.'], 200);
|
||||||
|
}
|
||||||
|
public function toggle(Request $request, $id)
|
||||||
|
{
|
||||||
|
createActivityLog(PopupsController::class, 'destroy', ' Popups destroy');
|
||||||
|
$data = Popups::findOrFail($id);
|
||||||
|
$requestData = ['status' => ($data->status == 1) ? 0 : 1];
|
||||||
|
DB::beginTransaction();
|
||||||
|
try {
|
||||||
|
$OperationNumber = getOperationNumber();
|
||||||
|
$this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $id);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
DB::rollBack();
|
||||||
|
Log::info($e->getMessage());
|
||||||
|
createErrorLog(PopupsController::class, 'destroy', $e->getMessage());
|
||||||
|
return response()->json(['status' => false, 'message' => $e->getMessage()], 500);
|
||||||
|
}
|
||||||
|
DB::commit();
|
||||||
|
return response()->json(['status' => true, 'message' => 'The Popups Deleted Successfully.'], 200);
|
||||||
|
}
|
||||||
|
}
|
@ -11,6 +11,7 @@ use App\Models\Menuitems;
|
|||||||
use App\Models\News;
|
use App\Models\News;
|
||||||
use App\Models\News_type;
|
use App\Models\News_type;
|
||||||
use App\Models\Newscategories;
|
use App\Models\Newscategories;
|
||||||
|
use App\Models\Popups;
|
||||||
use App\Models\Provinces;
|
use App\Models\Provinces;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Models\Teams;
|
use App\Models\Teams;
|
||||||
@ -18,6 +19,7 @@ use Illuminate\Support\Facades\Validator;
|
|||||||
use Illuminate\Support\Facades\View;
|
use Illuminate\Support\Facades\View;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
use App\Models\Videos;
|
use App\Models\Videos;
|
||||||
|
use Share;
|
||||||
|
|
||||||
class WebsiteController extends Controller
|
class WebsiteController extends Controller
|
||||||
{
|
{
|
||||||
@ -28,22 +30,20 @@ class WebsiteController extends Controller
|
|||||||
$this->path = config('app.client_path');
|
$this->path = config('app.client_path');
|
||||||
|
|
||||||
$headerMenuItems = Menuitems::where(['parent_menu' => 0, "status" => 1, "menulocations_id" => 1])->with('children')->orderBy('display_order')->get();
|
$headerMenuItems = Menuitems::where(['parent_menu' => 0, "status" => 1, "menulocations_id" => 1])->with('children')->orderBy('display_order')->get();
|
||||||
// dd($headerMenuItems->toArray());
|
|
||||||
$footerMenuItems = Menuitems::where(['parent_menu' => 0, "status" => 1, "menulocations_id" => 2])->with('children')->orderBy('display_order')->get();
|
$footerMenuItems = Menuitems::where(['parent_menu' => 0, "status" => 1, "menulocations_id" => 2])->with('children')->orderBy('display_order')->get();
|
||||||
$latestNews = News::where('status', 1)->inRandomOrder()->limit(4)->get();
|
$latestNews = News::where('status', 1)->inRandomOrder()->limit(4)->get();
|
||||||
// dd($recentNews);
|
|
||||||
|
|
||||||
$ads = Advertisements::where('status', 1)->where('parent_advertisement',0)->get();
|
$ads = Advertisements::where('status', 1)->where('parent_advertisement', 0)->get();
|
||||||
// dd($ads->toArray());
|
$adsWithChildren = Advertisements::where('status', 1)->where('parent_advertisement', 0)->orderBy('display_order')->with('children')->get();
|
||||||
$adsWithChildren = Advertisements::where('status',1)->where('parent_advertisement',0)->orderBy('display_order')->with('children')->get();
|
$popup = Popups::where('status',1)->latest()->first();
|
||||||
// dd($adsWithChildren->toArray());
|
|
||||||
View::share(
|
View::share(
|
||||||
[
|
[
|
||||||
'headerMenuItems' => $headerMenuItems,
|
'headerMenuItems' => $headerMenuItems,
|
||||||
'footerMenuItems' => $footerMenuItems,
|
'footerMenuItems' => $footerMenuItems,
|
||||||
'latestNews' => $latestNews,
|
'latestNews' => $latestNews,
|
||||||
'ads' => $ads,
|
'ads' => $ads,
|
||||||
'adsWithChildren' => $adsWithChildren
|
'adsWithChildren' => $adsWithChildren,
|
||||||
|
'popup' => $popup
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -96,11 +96,26 @@ class WebsiteController extends Controller
|
|||||||
|
|
||||||
public function newsDetail($alias)
|
public function newsDetail($alias)
|
||||||
{
|
{
|
||||||
|
$shareComponent = Share::currentPage()->facebook()->twitter()->whatsapp()->linkedin();
|
||||||
$news = News::where('alias', $alias)->where('status', 1)->first();
|
$news = News::where('alias', $alias)->where('status', 1)->first();
|
||||||
$recentNews = News::where('status', 1)->where('news_id', '!=', $news->news_id)->inRandomOrder()->limit(12)->latest()->get();
|
if (!$news) {
|
||||||
return view($this->path . '.news-detail', compact('news', 'recentNews'));
|
abort(404, 'News not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
$news->views_count = $news->views_count + 1;
|
||||||
|
$news->save();
|
||||||
|
|
||||||
|
$recentNews = News::where('status', 1)
|
||||||
|
->where('news_id', '!=', $news->news_id)
|
||||||
|
->inRandomOrder()
|
||||||
|
->limit(12)
|
||||||
|
->latest()
|
||||||
|
->get();
|
||||||
|
|
||||||
|
return view($this->path . '.news-detail', compact('news', 'recentNews','shareComponent'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function showHororscope()
|
public function showHororscope()
|
||||||
{
|
{
|
||||||
$rashifal = Horoscopes::where('status', 1)->orderBy('display_order')->limit(12)->get();
|
$rashifal = Horoscopes::where('status', 1)->orderBy('display_order')->limit(12)->get();
|
||||||
@ -174,13 +189,14 @@ class WebsiteController extends Controller
|
|||||||
public function showProvinces($id)
|
public function showProvinces($id)
|
||||||
{
|
{
|
||||||
$categoryTitle = Provinces::where('province_id', $id)->pluck('province_nepali_name')->first();
|
$categoryTitle = Provinces::where('province_id', $id)->pluck('province_nepali_name')->first();
|
||||||
$data = News::where('provinces_id',$id)->where('status',1)->orderBy('display_order')->paginate(9);
|
$data = News::where('provinces_id', $id)->where('status', 1)->orderBy('display_order')->paginate(9);
|
||||||
return view($this->path . '.single', compact('data','categoryTitle'));
|
return view($this->path . '.single', compact('data', 'categoryTitle'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function videoDetail($alias){
|
public function videoDetail($alias)
|
||||||
|
{
|
||||||
$data = Videos::where('alias', $alias)->where('status', 1)->first();
|
$data = Videos::where('alias', $alias)->where('status', 1)->first();
|
||||||
$recentNews = News::where('status',1)->inRandomOrder()->limit(12)->latest()->get();
|
$recentNews = News::where('status', 1)->inRandomOrder()->limit(12)->latest()->get();
|
||||||
return view($this->path . '.video-detail', compact('data','recentNews'));
|
return view($this->path . '.video-detail', compact('data', 'recentNews'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ class Advertisements extends Model
|
|||||||
'title',
|
'title',
|
||||||
'ad_categories_id',
|
'ad_categories_id',
|
||||||
'alias',
|
'alias',
|
||||||
|
'valid_till',
|
||||||
'parent_advertisement',
|
'parent_advertisement',
|
||||||
'thumb',
|
'thumb',
|
||||||
'link',
|
'link',
|
||||||
|
@ -31,6 +31,7 @@ class News extends Model
|
|||||||
'image',
|
'image',
|
||||||
'thumb',
|
'thumb',
|
||||||
'image_source',
|
'image_source',
|
||||||
|
'views_count',
|
||||||
'display_order',
|
'display_order',
|
||||||
'status',
|
'status',
|
||||||
'remarks',
|
'remarks',
|
||||||
|
51
app/Models/Popups.php
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use App\Traits\CreatedUpdatedBy;
|
||||||
|
|
||||||
|
class Popups extends Model
|
||||||
|
{
|
||||||
|
use HasFactory, CreatedUpdatedBy;
|
||||||
|
|
||||||
|
protected $primaryKey = 'id';
|
||||||
|
public $timestamps = true;
|
||||||
|
protected $fillable =[
|
||||||
|
'title',
|
||||||
|
'description',
|
||||||
|
'image',
|
||||||
|
'valid_till',
|
||||||
|
'link',
|
||||||
|
'status',
|
||||||
|
'display_order',
|
||||||
|
'createdBy',
|
||||||
|
'updatedBy',
|
||||||
|
'created_at',
|
||||||
|
'updated_at',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $appends = ['status_name'];
|
||||||
|
|
||||||
|
protected function getStatusNameAttribute()
|
||||||
|
{
|
||||||
|
return $this->status == 1 ? '<span class="badge text-bg-success-soft"> Active </span>' : '<span class="badge text-bg-danger-soft">Inactive</span>';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function createdBy(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function updatedBy(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn ($value) => User::find($value) ? User::find($value)->name : '',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
9
app/Repositories/Interface/PopupInterface.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repositories\Interface;
|
||||||
|
|
||||||
|
interface PopupInterface
|
||||||
|
{
|
||||||
|
public function create(array $popupDetail);
|
||||||
|
public function update($popupId, array $newDetails);
|
||||||
|
}
|
19
app/Repositories/PopupRepository.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repositories;
|
||||||
|
|
||||||
|
use App\Models\Popups;
|
||||||
|
use App\Repositories\Interface\PopupInterface;
|
||||||
|
|
||||||
|
class PopupRepository implements PopupInterface
|
||||||
|
{
|
||||||
|
public function create(array $popupDetail)
|
||||||
|
{
|
||||||
|
Popups::create($popupDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($popupId, array $newDetails)
|
||||||
|
{
|
||||||
|
return Popups::where('id', $popupId)->update($newDetails);
|
||||||
|
}
|
||||||
|
}
|
@ -9,6 +9,7 @@
|
|||||||
"brian2694/laravel-toastr": "^5.59",
|
"brian2694/laravel-toastr": "^5.59",
|
||||||
"google/recaptcha": "^1.3",
|
"google/recaptcha": "^1.3",
|
||||||
"guzzlehttp/guzzle": "^7.2",
|
"guzzlehttp/guzzle": "^7.2",
|
||||||
|
"jorenvanhocht/laravel-share": "^4.2",
|
||||||
"laravel/framework": "^10.10",
|
"laravel/framework": "^10.10",
|
||||||
"laravel/sanctum": "^3.2",
|
"laravel/sanctum": "^3.2",
|
||||||
"laravel/tinker": "^2.8",
|
"laravel/tinker": "^2.8",
|
||||||
|
65
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "21f9bae5dfa5a7adda4fc9f1ddad3d38",
|
"content-hash": "1393fa810c384d48b2c90249b5dca4c6",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brian2694/laravel-toastr",
|
"name": "brian2694/laravel-toastr",
|
||||||
@ -1294,6 +1294,69 @@
|
|||||||
],
|
],
|
||||||
"time": "2024-02-14T15:11:21+00:00"
|
"time": "2024-02-14T15:11:21+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "jorenvanhocht/laravel-share",
|
||||||
|
"version": "4.2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/jorenvh/laravel-share.git",
|
||||||
|
"reference": "86af334068038a840567ed62f2082fe3ac981476"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/jorenvh/laravel-share/zipball/86af334068038a840567ed62f2082fe3ac981476",
|
||||||
|
"reference": "86af334068038a840567ed62f2082fe3ac981476",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.4|^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"orchestra/testbench": "^6.13|^7.0",
|
||||||
|
"phpunit/phpunit": "^9.3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Jorenvh\\Share\\Providers\\ShareServiceProvider"
|
||||||
|
],
|
||||||
|
"aliases": {
|
||||||
|
"Share": "Jorenvh\\Share\\ShareFacade"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Jorenvh\\Share\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Joren Van Hocht",
|
||||||
|
"email": "joren@codeswitch.be",
|
||||||
|
"homepage": "https://codeswitch.be",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Optional package for Laravel to generate social share links.",
|
||||||
|
"homepage": "https://github.com/jorenvh/laravel-share",
|
||||||
|
"keywords": [
|
||||||
|
"laravel",
|
||||||
|
"share",
|
||||||
|
"social links",
|
||||||
|
"social share links"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/jorenvh/laravel-share/issues",
|
||||||
|
"source": "https://github.com/jorenvh/laravel-share/tree/4.2.0"
|
||||||
|
},
|
||||||
|
"time": "2022-02-11T17:20:09+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v10.44.0",
|
"version": "v10.44.0",
|
||||||
|
@ -174,6 +174,7 @@ return [
|
|||||||
Bibhuti\Installer\Providers\LaravelInstallerServiceProvider::class,
|
Bibhuti\Installer\Providers\LaravelInstallerServiceProvider::class,
|
||||||
Brian2694\Toastr\ToastrServiceProvider::class,
|
Brian2694\Toastr\ToastrServiceProvider::class,
|
||||||
Spatie\Permission\PermissionServiceProvider::class,
|
Spatie\Permission\PermissionServiceProvider::class,
|
||||||
|
Jorenvh\Share\Providers\ShareServiceProvider::class,
|
||||||
|
|
||||||
|
|
||||||
])->toArray(),
|
])->toArray(),
|
||||||
@ -191,6 +192,7 @@ return [
|
|||||||
|
|
||||||
'aliases' => Facade::defaultAliases()->merge([
|
'aliases' => Facade::defaultAliases()->merge([
|
||||||
'Toastr' => Brian2694\Toastr\Facades\Toastr::class,
|
'Toastr' => Brian2694\Toastr\Facades\Toastr::class,
|
||||||
|
'Share' => Jorenvh\Share\ShareFacade::class,
|
||||||
])->toArray(),
|
])->toArray(),
|
||||||
|
|
||||||
];
|
];
|
||||||
|
57
config/laravel-share.php
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Services
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specify the base uri for each service.
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'services' => [
|
||||||
|
'facebook' => [
|
||||||
|
'uri' => 'https://www.facebook.com/sharer/sharer.php?u=',
|
||||||
|
],
|
||||||
|
'twitter' => [
|
||||||
|
'uri' => 'https://twitter.com/intent/tweet',
|
||||||
|
'text' => 'Default share text',
|
||||||
|
],
|
||||||
|
'linkedin' => [
|
||||||
|
'uri' => 'https://www.linkedin.com/sharing/share-offsite', // oud: http://www.linkedin.com/shareArticle
|
||||||
|
'extra' => ['mini' => 'true'],
|
||||||
|
],
|
||||||
|
'whatsapp' => [
|
||||||
|
'uri' => 'https://wa.me/?text=',
|
||||||
|
'extra' => ['mini' => 'true'],
|
||||||
|
],
|
||||||
|
'pinterest' => [
|
||||||
|
'uri' => 'https://pinterest.com/pin/create/button/?url=',
|
||||||
|
],
|
||||||
|
'reddit' => [
|
||||||
|
'uri' => 'https://www.reddit.com/submit',
|
||||||
|
'text' => 'Default share text',
|
||||||
|
],
|
||||||
|
'telegram' => [
|
||||||
|
'uri' => 'https://telegram.me/share/url',
|
||||||
|
'text' => 'Default share text',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Font Awesome
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specify the version of Font Awesome that you want to use.
|
||||||
|
| We support version 4 and 5.
|
||||||
|
|
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'fontAwesomeVersion' => 5,
|
||||||
|
];
|
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('news', function (Blueprint $table) {
|
||||||
|
$table->unsignedInteger('views_count')->nullable()->after('image_source');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('news', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('views_count');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('advertisements', function (Blueprint $table) {
|
||||||
|
$table->date('valid_till')->nullable()->after('parent_advertisement');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('advertisements', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('valid_till');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
36
database/migrations/2024_06_21_044940_create_popup_table.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('popups', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('title')->nullable();
|
||||||
|
$table->string('description')->nullable();
|
||||||
|
$table->string('image')->nullable();
|
||||||
|
$table->date('valid_till')->nullable();
|
||||||
|
$table->string('link')->nullable();
|
||||||
|
$table->integer('status')->nullable();
|
||||||
|
$table->integer('display_order')->nullable();
|
||||||
|
$table->integer('createdBy')->nullable();
|
||||||
|
$table->integer('updatedBy')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('popups');
|
||||||
|
}
|
||||||
|
};
|
20
public/js/share.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
var popupSize = {
|
||||||
|
width: 780,
|
||||||
|
height: 550
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).on('click', '.social-button', function (e) {
|
||||||
|
var verticalPos = Math.floor(($(window).width() - popupSize.width) / 2),
|
||||||
|
horisontalPos = Math.floor(($(window).height() - popupSize.height) / 2);
|
||||||
|
|
||||||
|
var popup = window.open($(this).prop('href'), 'social',
|
||||||
|
'width=' + popupSize.width + ',height=' + popupSize.height +
|
||||||
|
',left=' + verticalPos + ',top=' + horisontalPos +
|
||||||
|
',location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1');
|
||||||
|
|
||||||
|
if (popup) {
|
||||||
|
popup.focus();
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
11
resources/lang/vendor/laravel-share/en/laravel-share-fa5.php
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'facebook' => '<li><a href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-facebook-square"></span></a></li>',
|
||||||
|
'twitter' => '<li><a href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-twitter"></span></a></li>',
|
||||||
|
'linkedin' => '<li><a href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-linkedin"></span></a></li>',
|
||||||
|
'whatsapp' => '<li><a target="_blank" href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-whatsapp"></span></a></li>',
|
||||||
|
'pinterest' => '<li><a href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-pinterest"></span></a></li>',
|
||||||
|
'reddit' => '<li><a target="_blank" href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-reddit"></span></a></li>',
|
||||||
|
'telegram' => '<li><a target="_blank" href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-telegram"></span></a></li>',
|
||||||
|
];
|
@ -130,6 +130,7 @@
|
|||||||
{{ CCMS::createMenuLink('Horoscope', route('horoscope.index')) }}
|
{{ CCMS::createMenuLink('Horoscope', route('horoscope.index')) }}
|
||||||
{{ CCMS::createMenuLink('Artilces', route('articles.index')) }}
|
{{ CCMS::createMenuLink('Artilces', route('articles.index')) }}
|
||||||
{{ CCMS::createMenuLink('Teams', route('teams.index')) }}
|
{{ CCMS::createMenuLink('Teams', route('teams.index')) }}
|
||||||
|
{{ CCMS::createMenuLink('Popup', route('popups.index')) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -14,12 +14,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6">{{ createText('link', 'link', 'Link') }}
|
<div class="col-lg-6">{{ createText('link', 'link', 'Link') }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-lg-6">{{ createDate('valid_till', 'Valid Till', '','') }}
|
||||||
|
</div>
|
||||||
<div class="col-lg-6">{{ createCustomSelect('tbl_adcategories', 'title', 'category_id','', 'Category Id', 'ad_categories_id', 'form-control select2', 'status<>-1') }}
|
<div class="col-lg-6">{{ createCustomSelect('tbl_adcategories', 'title', 'category_id','', 'Category Id', 'ad_categories_id', 'form-control select2', 'status<>-1') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
{{ createCustomSelect('tbl_advertisements', 'title', 'advertisement_id', '', 'Parent Advertisement', 'parent_advertisement', 'form-control select2', 'status<>-1') }}
|
{{ createCustomSelect('tbl_advertisements', 'title', 'advertisement_id', '', 'Parent Advertisement', 'parent_advertisement', 'form-control select2', 'status<>-1') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-12 pb-2">{{ createImageInput('thumb', 'Thumb') }}
|
<div class="col-lg-6 pb-2">{{ createImageInput('thumb', 'Thumb') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-12 pb-2">{{ createPlainTextArea('remarks', 'remarks ', 'Remarks') }}
|
<div class="col-lg-12 pb-2">{{ createPlainTextArea('remarks', 'remarks ', 'Remarks') }}
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6">{{ createText('link', 'link', 'Link', '', $data->link) }}
|
<div class="col-lg-6">{{ createText('link', 'link', 'Link', '', $data->link) }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-lg-6">{{ createDate('valid_till', 'Valid Till', '',$data->valid_till) }}
|
||||||
|
</div>
|
||||||
<div class="col-lg-6">{{ createCustomSelect('tbl_adcategories', 'title', 'category_id',$data->ad_categories_id, 'Category Id', 'ad_categories_id', 'form-control select2', 'status<>-1') }}
|
<div class="col-lg-6">{{ createCustomSelect('tbl_adcategories', 'title', 'category_id',$data->ad_categories_id, 'Category Id', 'ad_categories_id', 'form-control select2', 'status<>-1') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-6">
|
||||||
|
@ -69,6 +69,18 @@
|
|||||||
{{ createImageInput('image', 'Image') }}
|
{{ createImageInput('image', 'Image') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4 class="card-title mb-0">Status</h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-check form-switch form-switch-lg form-switch-success mb-3" dir="ltr">
|
||||||
|
<input type="checkbox" class="form-check-input" id="customSwitchsizelg"
|
||||||
|
name="status" checked="">
|
||||||
|
<label class="form-check-label" for="customSwitchsizelg">Active</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h4 class="card-title mb-0">Featured News</h4>
|
<h4 class="card-title mb-0">Featured News</h4>
|
||||||
|
@ -1,8 +1,37 @@
|
|||||||
@extends('backend.template')
|
@extends('backend.template')
|
||||||
|
@push('css')
|
||||||
|
<style>
|
||||||
|
.news-item {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-left: -60em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.news-link {
|
||||||
|
color: #007bff;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.news-link:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@endpush
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class='card'>
|
<div class='card'>
|
||||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||||
<h2 class="">{{ label('Edit News') }}</h2>
|
<h2 class="">{{ label('Edit News') }}</h2>
|
||||||
|
@php $url = config('app.url') @endphp
|
||||||
|
<div class="news-item">
|
||||||
|
@if ($data->featured_news == 'True')
|
||||||
|
<a href="{{ $url }}/" class="news-link">Featured News</a>
|
||||||
|
@else
|
||||||
|
<a href="{{ $url }}/newsDetail/{{ $data->alias }}" class="news-link">View News</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('news.index')); ?>
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('news.index')); ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -36,16 +65,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
{{ createText('title', 'title', 'Title','',$data->title) }}
|
{{ createText('title', 'title', 'Title', '', $data->title) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-12 pb-2">
|
<div class="col-lg-12 pb-2">
|
||||||
{{ createText('nepali_title', 'nepali_title', 'Nepali Title','',$data->nepali_title) }}
|
{{ createText('nepali_title', 'nepali_title', 'Nepali Title', '', $data->nepali_title) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-12 pb-2">
|
<div class="col-lg-12 pb-2">
|
||||||
{{ createPlainTextArea('short_description','', 'Short Description',$data->short_description) }}
|
{{ createPlainTextArea('short_description', '', 'Short Description', $data->short_description) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-12 pb-2">
|
<div class="col-lg-12 pb-2">
|
||||||
{{ createTextarea('content', 'content ckeditor-classic', 'Content','',$data->content) }}
|
{{ createTextarea('content', 'content ckeditor-classic', 'Content', '', $data->content) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -64,9 +93,21 @@
|
|||||||
<h4 class="card-title mb-0">Cover Photo</h4>
|
<h4 class="card-title mb-0">Cover Photo</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{{ createImageInput('thumb', 'Thumb','',$data->thumb) }}
|
{{ createImageInput('thumb', 'Thumb', '', $data->thumb) }}
|
||||||
<div class="border mt-3 border-dashed"></div>
|
<div class="border mt-3 border-dashed"></div>
|
||||||
{{ createImageInput('image', 'Image','',$data->image) }}
|
{{ createImageInput('image', 'Image', '', $data->image) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4 class="card-title mb-0">Status</h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-check form-switch form-switch-lg form-switch-success mb-3" dir="ltr">
|
||||||
|
<input type="checkbox" class="form-check-input" id="customSwitchsizelg" name="status"
|
||||||
|
@checked($data->status == 1)>
|
||||||
|
<label class="form-check-label" for="customSwitchsizelg">Publish</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
30
resources/views/crud/generated/popups/create.blade.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
@extends('backend.template')
|
||||||
|
@section('content')
|
||||||
|
<div class='card'>
|
||||||
|
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||||
|
<h2 class="">{{ label('Add Popups') }}</h2>
|
||||||
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('popups.index')); ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class='card-body'>
|
||||||
|
<form action="{{ route('popups.store') }}" id="storeCustomForm" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-6">{{ createText('title', 'title', 'Title') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12 pb-2">
|
||||||
|
{{ createTextarea('description', 'description ckeditor-classic', 'Description') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12 pb-2">{{ createImageInput('image', 'Image') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 pb-2">{{ createDate('valid_till', 'Valid Till', '', date('Y-m-d')) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">{{ createText('link', 'link', 'Link') }}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12"><?php createButton('btn-primary btn-store', '', 'Submit'); ?>
|
||||||
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('popups.index')); ?>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
30
resources/views/crud/generated/popups/edit.blade.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
@extends('backend.template')
|
||||||
|
@section('content')
|
||||||
|
<div class='card'>
|
||||||
|
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||||
|
<h2 class="">{{ label('Edit Popups') }}</h2>
|
||||||
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('popups.index')); ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class='card-body'>
|
||||||
|
<form action="{{ route('popups.update', [$data->id]) }}" id="updateCustomForm" method="POST">
|
||||||
|
@csrf <input type=hidden name='id' value='{{ $data->id }}' />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-6">{{ createText('title', 'title', 'Title', '', $data->title) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12 pb-2">
|
||||||
|
{{ createTextarea('description', 'description ckeditor-classic', 'Description', $data->description) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12 pb-2">{{ createImageInput('image', 'Image', '', $data->image) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 pb-2">{{ createDate('valid_till', 'Valid Till', '', $data->valid_till) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">{{ createText('link', 'link', 'Link', '', $data->link) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12"><?php createButton('btn-primary btn-update', '', 'Submit'); ?>
|
||||||
|
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('popups.index')); ?>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
235
resources/views/crud/generated/popups/index.blade.php
Normal file
@ -0,0 +1,235 @@
|
|||||||
|
@extends('backend.template')
|
||||||
|
@section('content')
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header d-flex justify-content-between align-items-center">
|
||||||
|
<h2>{{ label("Popups List") }}</h2>
|
||||||
|
<a href="{{ route('popups.create') }}" class="btn btn-primary"><span>{{label("Create New")}}</span></a>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table dataTable" id="tbl_popups" data-url="{{ route('popups.sort') }}">
|
||||||
|
<thead class="table-light">
|
||||||
|
<tr>
|
||||||
|
<th class="tb-col"><span class="overline-title">{{label("Sn.")}}</span></th>
|
||||||
|
<th class="tb-col"><span class="overline-title">{{ label("title") }}</span></th>
|
||||||
|
<th class="tb-col"><span class="overline-title">{{ label("image") }}</span></th>
|
||||||
|
<th class="tb-col"><span class="overline-title">{{ label("valid_till") }}</span></th>
|
||||||
|
<th class="tb-col"><span class="overline-title">{{ label("link") }}</span></th>
|
||||||
|
<th class="tb-col"><span class="overline-title">{{ label("createdBy") }}</span></th>
|
||||||
|
<th class="tb-col"><span class="overline-title">{{ label("updatedBy") }}</span></th>
|
||||||
|
<th class="tb-col" data-sortable="false"><span
|
||||||
|
class="overline-title">{{ label("Action") }}</span>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@php
|
||||||
|
$i = 1;
|
||||||
|
@endphp
|
||||||
|
@foreach ($data as $item)
|
||||||
|
|
||||||
|
<tr data-id="{{$item->id}}" data-display_order="{{$item->display_order}}" class="draggable-row <?php echo ($item->status==0)?"bg-light bg-danger":""; ?>">
|
||||||
|
<td class="tb-col">{{ $i++ }}</td><td class="tb-col">{{ $item->title }}</td>
|
||||||
|
<td class="tb-col">{{ showImageThumb($item->image) }}</td>
|
||||||
|
<td class="tb-col">{{ myDate($item->valid_till) }}</td>
|
||||||
|
<td class="tb-col">{{ $item->link }}</td>
|
||||||
|
<td class="tb-col">{{ $item->createdBy }}</td>
|
||||||
|
<td class="tb-col">{{ $item->updatedBy }}</td>
|
||||||
|
<td class="tb-col">
|
||||||
|
<div class="dropdown d-inline-block">
|
||||||
|
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
|
<i class="ri-more-fill align-middle"></i>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end">
|
||||||
|
<li><a href="{{route('popups.show',[$item->id])}}" class="dropdown-item"><i class="ri-eye-fill align-bottom me-2 text-muted"></i> {{label("View")}}</a></li>
|
||||||
|
<li><a href="{{route('popups.edit',[$item->id])}}" class="dropdown-item edit-item-btn"><i class="ri-pencil-fill align-bottom me-2 text-muted"></i> {{label("Edit")}}</a></li>
|
||||||
|
<li>
|
||||||
|
<a href="{{route('popups.toggle',[$item->id])}}" class="dropdown-item toggle-item-btn" onclick="confirmToggle(this.href)">
|
||||||
|
<i class="ri-article-fill align-bottom me-2 text-muted"></i> {{ ($item->status==1)?label('Unpublish'):label('Publish') }}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{{route('popups.destroy',[$item->id])}}" class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||||
|
<i class="ri-delete-bin-fill align-bottom me-2 text-muted"></i> {{ label('Delete') }}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@push("css")
|
||||||
|
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.5/css/dataTables.bootstrap4.min.css">
|
||||||
|
<link rel="stylesheet" href="https://cdn.datatables.net/rowreorder/1.4.0/css/rowReorder.dataTables.min.css">
|
||||||
|
@endpush
|
||||||
|
@push("js")
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.68/pdfmake.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.68/vfs_fonts.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/1.13.5/js/jquery.dataTables.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.html5.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/rowreorder/1.4.0/js/dataTables.rowReorder.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(e) {
|
||||||
|
$('.change-alias-badge').on('click', function() {
|
||||||
|
var aliasWrapper = $(this).prev('.alias-wrapper');
|
||||||
|
var aliasSpan = aliasWrapper.find('.alias');
|
||||||
|
var aliasInput = aliasWrapper.find('.alias-input');
|
||||||
|
var isEditing = $(this).hasClass('editing');
|
||||||
|
aliasInput.toggleClass("d-none");
|
||||||
|
if (isEditing) {
|
||||||
|
// Update alias text and switch to non-editing state
|
||||||
|
var newAlias = aliasInput.val();
|
||||||
|
aliasSpan.text(newAlias);
|
||||||
|
aliasSpan.show();
|
||||||
|
aliasInput.hide();
|
||||||
|
$(this).removeClass('editing').text('Change Alias');
|
||||||
|
var articleId = $(aliasWrapper).data('id');
|
||||||
|
var ajaxUrl = "{{ route('popups.updatealias') }}";
|
||||||
|
var data = {
|
||||||
|
articleId: articleId,
|
||||||
|
newAlias: newAlias
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: ajaxUrl,
|
||||||
|
type: 'POST',
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||||
|
},
|
||||||
|
data: data,
|
||||||
|
success: function(response) {
|
||||||
|
console.log(response);
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// Switch to editing state
|
||||||
|
aliasSpan.hide();
|
||||||
|
aliasInput.show().focus();
|
||||||
|
$(this).addClass('editing').text('Save Alias');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
var mytable = $(".dataTable").DataTable({
|
||||||
|
ordering: true,
|
||||||
|
rowReorder: {
|
||||||
|
//selector: 'tr'
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
var isRowReorderComplete = false;
|
||||||
|
|
||||||
|
mytable.on('row-reorder', function(e, diff, edit) {
|
||||||
|
isRowReorderComplete = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
mytable.on('draw', function() {
|
||||||
|
if (isRowReorderComplete) {
|
||||||
|
var url = mytable.table().node().getAttribute('data-url');
|
||||||
|
var ids = mytable.rows().nodes().map(function(node) {
|
||||||
|
return $(node).data('id');
|
||||||
|
}).toArray();
|
||||||
|
|
||||||
|
console.log(ids);
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: "POST",
|
||||||
|
headers: {
|
||||||
|
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
id_order: ids
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
console.log(response);
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
isRowReorderComplete=false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
function confirmDelete(url) {
|
||||||
|
event.preventDefault();
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Are you sure?',
|
||||||
|
text: 'You will not be able to recover this item!',
|
||||||
|
icon: 'warning',
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: 'Delete',
|
||||||
|
cancelButtonText: 'Cancel',
|
||||||
|
reverseButtons: true
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: 'DELETE',
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
Swal.fire('Deleted!', 'The item has been deleted.', 'success');
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
Swal.fire('Error!', 'An error occurred while deleting the item.', 'error');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function confirmToggle(url) {
|
||||||
|
event.preventDefault();
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Are you sure?',
|
||||||
|
text: 'Publish Status of Item will be changed!! if Unpublished, links will be dead!',
|
||||||
|
icon: 'warning',
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: 'Proceed',
|
||||||
|
cancelButtonText: 'Cancel',
|
||||||
|
reverseButtons: true
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: 'GET',
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
Swal.fire('Updated!', 'Publishing Status has been updated.', 'success');
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
Swal.fire('Error!', 'An error occurred.', 'error');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
@endpush
|
||||||
|
|
29
resources/views/crud/generated/popups/show.blade.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
@extends('backend.template')
|
||||||
|
@section('content')
|
||||||
|
<div class='card'>
|
||||||
|
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||||
|
<h2><?php echo label('View Details'); ?></h2>
|
||||||
|
<?php createButton("btn-primary btn-cancel","","Back to List",route('popups.index')); ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class='card-body'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p><b>Title : </b> <span>{{$data->title}}</span></p><p><b>Description : </b> <span>{{$data->description}}</span></p><p><b>Image : </b> <span>{{$data->image}}</span></p><p><b>Valid Till : </b> <span>{{$data->valid_till}}</span></p><p><b>Link : </b> <span>{{$data->link}}</span></p><p><b>Status : </b> <span
|
||||||
|
class="{{$data->status == 1 ? 'text-success' : 'text-danger'}}">{{$data->status == 1 ? 'Active' : 'Inactive'}}</span></p><p><b>Display Order : </b> <span>{{$data->display_order}}</span></p><div class="d-flex justify-content-between">
|
||||||
|
<div>
|
||||||
|
<p><b>Created On :</b> <span>{{$data->created_at}}</span></p>
|
||||||
|
<p><b>Created By :</b> <span>{{$data->createdBy}}</span></p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p><b>Updated On :</b> <span>{{$data->updated_at}}</span></p>
|
||||||
|
<p><b>Updated By :</b> <span>{{$data->updatedBy}}</span></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endSection
|
@ -1,23 +1,24 @@
|
|||||||
@extends('hulaki_khabar.layout.layout')
|
@extends('hulaki_khabar.layout.layout')
|
||||||
@section('content')
|
@section('content')
|
||||||
|
@php
|
||||||
|
if (!is_null($popup) && !is_null(optional($popup->valid_till))) {
|
||||||
|
$activeStatus = $popup->valid_till >= \Carbon\Carbon::now();
|
||||||
|
} else {
|
||||||
|
$activeStatus = false;
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
@includeWhen($activeStatus, 'hulaki_khabar.popup.popup-modal', ['data' => $popup])
|
||||||
@include('hulaki_khabar.home.main-news')
|
@include('hulaki_khabar.home.main-news')
|
||||||
{{-- @include('hulaki_khabar.home.ads') --}}
|
|
||||||
@include('hulaki_khabar.home.country')
|
@include('hulaki_khabar.home.country')
|
||||||
{{-- @include('hulaki_khabar.home.ads') --}}
|
|
||||||
@include('hulaki_khabar.home.international')
|
@include('hulaki_khabar.home.international')
|
||||||
@include('hulaki_khabar.home.politics')
|
@include('hulaki_khabar.home.politics')
|
||||||
{{-- @include('hulaki_khabar.home.ads') --}}
|
|
||||||
@include('hulaki_khabar.home.interview')
|
@include('hulaki_khabar.home.interview')
|
||||||
@include('hulaki_khabar.home.business')
|
@include('hulaki_khabar.home.business')
|
||||||
{{-- @include('hulaki_khabar.home.ads') --}}
|
|
||||||
@include('hulaki_khabar.home.sports')
|
@include('hulaki_khabar.home.sports')
|
||||||
@include('hulaki_khabar.home.culture-tech')
|
@include('hulaki_khabar.home.culture-tech')
|
||||||
{{-- @include('hulaki_khabar.home.ads') --}}
|
|
||||||
@include('hulaki_khabar.home.entertainment')
|
@include('hulaki_khabar.home.entertainment')
|
||||||
@include('hulaki_khabar.home.feature')
|
@include('hulaki_khabar.home.feature')
|
||||||
{{-- @include('hulaki_khabar.home.ads') --}}
|
|
||||||
@include('hulaki_khabar.home.main-video')
|
@include('hulaki_khabar.home.main-video')
|
||||||
{{-- @include('hulaki_khabar.home.ads') --}}
|
|
||||||
@include('hulaki_khabar.home.society')
|
@include('hulaki_khabar.home.society')
|
||||||
@include('hulaki_khabar.home.health')
|
@include('hulaki_khabar.home.health')
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -95,26 +95,26 @@
|
|||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<aside class="widget-area">
|
<aside class="widget-area">
|
||||||
@foreach ($adsWithChildren as $parentads)
|
@foreach ($adsWithChildren as $parentads)
|
||||||
@if ($parentads->ad_categories_id == 9)
|
@if ($parentads->ad_categories_id == 9 && now()->isBefore($parentads->valid_till))
|
||||||
<section class="widget widget_featured_reports">
|
<section class="widget widget_featured_reports">
|
||||||
<div class=" col-lg-10" style=" margin-left: 10%;">
|
<div class="col-lg-10" style="margin-left: 10%;">
|
||||||
<img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
|
<img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@if ($parentads->children->isNotEmpty())
|
@foreach ($parentads->children as $child)
|
||||||
@foreach ($parentads->children as $child)
|
@if (now()->isBefore($child->valid_till))
|
||||||
<section class="widget widget_featured_reports">
|
<section class="widget widget_featured_reports">
|
||||||
<div class=" col-lg-10" style=" margin-left: 10%;">
|
<div class="col-lg-10" style="margin-left: 10%;">
|
||||||
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
|
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@endforeach
|
@endif
|
||||||
@endif
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -124,7 +124,7 @@
|
|||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
@if ($ads->isNotEmpty())
|
@if ($ads->isNotEmpty())
|
||||||
@foreach ($ads as $ad)
|
@foreach ($ads as $ad)
|
||||||
@if ($ad->ad_categories_id == 8)
|
@if ($ad->ad_categories_id == 8 && now()->isBefore($ad->valid_till))
|
||||||
<a href="{{ $ad->link }}">
|
<a href="{{ $ad->link }}">
|
||||||
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
||||||
</a>
|
</a>
|
||||||
|
@ -169,7 +169,7 @@
|
|||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
@if ($ads->isNotEmpty())
|
@if ($ads->isNotEmpty())
|
||||||
@foreach ($ads as $ad)
|
@foreach ($ads as $ad)
|
||||||
@if ($ad->ad_categories_id == 4)
|
@if ($ad->ad_categories_id == 4 && now()->isBefore($ad->valid_till))
|
||||||
<a href="{{ $ad->link }}">
|
<a href="{{ $ad->link }}">
|
||||||
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
||||||
</a>
|
</a>
|
||||||
|
@ -23,7 +23,8 @@
|
|||||||
<div class="row align-items-center">
|
<div class="row align-items-center">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="sports-news-image">
|
<div class="sports-news-image">
|
||||||
<a href="{{route('newsDetail',['alias' => $item->alias])}}">
|
<a
|
||||||
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
|
||||||
<img src="{{ asset($item->thumb) }}" alt="image">
|
<img src="{{ asset($item->thumb) }}" alt="image">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -31,7 +32,8 @@
|
|||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<div class="sports-news-content">
|
<div class="sports-news-content">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->title }}</a>
|
<a
|
||||||
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->title }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -50,7 +52,8 @@
|
|||||||
<div class="row align-items-center">
|
<div class="row align-items-center">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="sports-news-image">
|
<div class="sports-news-image">
|
||||||
<a href="{{route('newsDetail',['alias' => $item->alias])}}">
|
<a
|
||||||
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
|
||||||
<img src="{{ asset($item->thub) }}" alt="image">
|
<img src="{{ asset($item->thub) }}" alt="image">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -58,7 +61,8 @@
|
|||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
<div class="sports-news-content">
|
<div class="sports-news-content">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->title }}</a>
|
<a
|
||||||
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->title }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -85,25 +89,26 @@
|
|||||||
@foreach ($technology as $type)
|
@foreach ($technology as $type)
|
||||||
@if ($type->alias == 'technology')
|
@if ($type->alias == 'technology')
|
||||||
@foreach ($type->news->take(3) as $item)
|
@foreach ($type->news->take(3) as $item)
|
||||||
<div class="single-tech-news">
|
<div class="single-tech-news">
|
||||||
<div class="row align-items-center">
|
<div class="row align-items-center">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="tech-news-image">
|
<div class="tech-news-image">
|
||||||
<a href="{{route('newsDetail',['alias' => $item->alias])}}">
|
<a
|
||||||
<img src="{{ asset($item->thumb) }}"
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
|
||||||
alt="image">
|
<img src="{{ asset($item->thumb) }}" alt="image">
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-lg-8">
|
||||||
<div class="col-lg-8">
|
<div class="tech-news-content">
|
||||||
<div class="tech-news-content">
|
<h3>
|
||||||
<h3>
|
<a
|
||||||
<a href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->title }}</a>
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->title }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@ -113,25 +118,26 @@
|
|||||||
@foreach ($technology as $type)
|
@foreach ($technology as $type)
|
||||||
@if ($type->alias == 'technology')
|
@if ($type->alias == 'technology')
|
||||||
@foreach ($type->news->skip(3) as $item)
|
@foreach ($type->news->skip(3) as $item)
|
||||||
<div class="single-tech-news">
|
<div class="single-tech-news">
|
||||||
<div class="row align-items-center">
|
<div class="row align-items-center">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="tech-news-image">
|
<div class="tech-news-image">
|
||||||
<a href="{{route('newsDetail',['alias' => $item->alias])}}">
|
<a
|
||||||
<img src="{{ asset($item->thumb) }}"
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
|
||||||
alt="image">
|
<img src="{{ asset($item->thumb) }}" alt="image">
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-lg-8">
|
||||||
<div class="col-lg-8">
|
<div class="tech-news-content">
|
||||||
<div class="tech-news-content">
|
<h3>
|
||||||
<h3>
|
<a
|
||||||
<a href="{{route('newsDetail',['alias' => $item->alias])}}">{{ $item->title }}</a>
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->title }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@ -147,7 +153,7 @@
|
|||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<aside class="widget-area">
|
<aside class="widget-area">
|
||||||
@foreach ($adsWithChildren as $parentads)
|
@foreach ($adsWithChildren as $parentads)
|
||||||
@if ($parentads->ad_categories_id == 11)
|
@if ($parentads->ad_categories_id == 11 && now()->isBefore($parentads->valid_till))
|
||||||
<section class="widget widget_featured_reports">
|
<section class="widget widget_featured_reports">
|
||||||
<div class=" col-lg-10" style=" margin-left: 10%;">
|
<div class=" col-lg-10" style=" margin-left: 10%;">
|
||||||
<img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
|
<img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
|
||||||
@ -155,11 +161,13 @@
|
|||||||
</section>
|
</section>
|
||||||
@if ($parentads->children->isNotEmpty())
|
@if ($parentads->children->isNotEmpty())
|
||||||
@foreach ($parentads->children as $child)
|
@foreach ($parentads->children as $child)
|
||||||
<section class="widget widget_featured_reports">
|
@if (now()->isBefore($child->valid_till))
|
||||||
<div class=" col-lg-10" style=" margin-left: 10%;">
|
<section class="widget widget_featured_reports">
|
||||||
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
|
<div class=" col-lg-10" style=" margin-left: 10%;">
|
||||||
</div>
|
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
|
||||||
</section>
|
</div>
|
||||||
|
</section>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@ -176,7 +184,7 @@
|
|||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
@if ($ads->isNotEmpty())
|
@if ($ads->isNotEmpty())
|
||||||
@foreach ($ads as $ad)
|
@foreach ($ads as $ad)
|
||||||
@if ($ad->ad_categories_id == 10)
|
@if ($ad->ad_categories_id == 10 && now()->isBefore($ad->valid_till))
|
||||||
<a href="{{ $ad->link }}">
|
<a href="{{ $ad->link }}">
|
||||||
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
||||||
</a>
|
</a>
|
||||||
@ -187,5 +195,3 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-8">
|
<div class="col-lg-8">
|
||||||
|
|
||||||
<!-- Feature News -->
|
<!-- Feature News -->
|
||||||
<div class="most-popular-news" id="business">
|
<div class="most-popular-news" id="business">
|
||||||
<div class="section-title">
|
<div class="section-title">
|
||||||
@ -44,7 +45,7 @@
|
|||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<aside class="widget-area">
|
<aside class="widget-area">
|
||||||
@foreach ($adsWithChildren as $parentads)
|
@foreach ($adsWithChildren as $parentads)
|
||||||
@if ($parentads->ad_categories_id == 13)
|
@if ($parentads->ad_categories_id == 13 && now()->isBefore($parentads->valid_till))
|
||||||
<section class="widget widget_featured_reports">
|
<section class="widget widget_featured_reports">
|
||||||
<div class=" col-lg-10" style=" margin-left: 10%;">
|
<div class=" col-lg-10" style=" margin-left: 10%;">
|
||||||
<img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
|
<img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
|
||||||
@ -52,11 +53,13 @@
|
|||||||
</section>
|
</section>
|
||||||
@if ($parentads->children->isNotEmpty())
|
@if ($parentads->children->isNotEmpty())
|
||||||
@foreach ($parentads->children as $child)
|
@foreach ($parentads->children as $child)
|
||||||
<section class="widget widget_featured_reports">
|
@if (now()->isBefore($child->valid_till))
|
||||||
<div class=" col-lg-10" style=" margin-left: 10%;">
|
<section class="widget widget_featured_reports">
|
||||||
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
|
<div class=" col-lg-10" style=" margin-left: 10%;">
|
||||||
</div>
|
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
|
||||||
</section>
|
</div>
|
||||||
|
</section>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<aside class="widget-area">
|
<aside class="widget-area">
|
||||||
@foreach ($adsWithChildren as $parentads)
|
@foreach ($adsWithChildren as $parentads)
|
||||||
@if ($parentads->ad_categories_id == 15)
|
@if ($parentads->ad_categories_id == 15 && now()->isBefore($parentads->valid_till))
|
||||||
<section class="widget widget_featured_reports">
|
<section class="widget widget_featured_reports">
|
||||||
<div class=" col-lg-10" style=" margin-left: 10%;">
|
<div class=" col-lg-10" style=" margin-left: 10%;">
|
||||||
<img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
|
<img src="{{ asset($parentads->thumb) }}" alt="{{ $parentads->title }}">
|
||||||
@ -50,11 +50,13 @@
|
|||||||
</section>
|
</section>
|
||||||
@if ($parentads->children->isNotEmpty())
|
@if ($parentads->children->isNotEmpty())
|
||||||
@foreach ($parentads->children as $child)
|
@foreach ($parentads->children as $child)
|
||||||
<section class="widget widget_featured_reports">
|
@if (now()->isBefore($child->valid_till))
|
||||||
<div class=" col-lg-10" style=" margin-left: 10%;">
|
<section class="widget widget_featured_reports">
|
||||||
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
|
<div class=" col-lg-10" style=" margin-left: 10%;">
|
||||||
</div>
|
<img src="{{ asset($child->thumb) }}" alt="{{ $child->title }}">
|
||||||
</section>
|
</div>
|
||||||
|
</section>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
@foreach ($adsWithChildren as $ads)
|
@foreach ($adsWithChildren as $ads)
|
||||||
@if ($ads->children->isNotEmpty())
|
@if ($ads->children->isNotEmpty())
|
||||||
@foreach ($ads->children as $item)
|
@foreach ($ads->children as $item)
|
||||||
@if ($item->ad_categories_id == 5)
|
@if ($item->ad_categories_id == 5 && now()->isBefore($item->valid_till))
|
||||||
<section class="widget widget_featured_reports">
|
<section class="widget widget_featured_reports">
|
||||||
<img src="{{ asset($item->thumb) }}" alt="{{ $item->title }}"
|
<img src="{{ asset($item->thumb) }}" alt="{{ $item->title }}"
|
||||||
class="img-fluid">
|
class="img-fluid">
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
@if ($ads->isNotEmpty())
|
@if ($ads->isNotEmpty())
|
||||||
@foreach ($ads as $ad)
|
@foreach ($ads as $ad)
|
||||||
@if ($ad->ad_categories_id == 3)
|
@if ($ad->ad_categories_id == 3 && now()->isBefore($ad->valid_till))
|
||||||
<a href="{{ $ad->link }}">
|
<a href="{{ $ad->link }}">
|
||||||
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
||||||
</a>
|
</a>
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
@if ($ads->isNotEmpty())
|
@if ($ads->isNotEmpty())
|
||||||
@foreach ($ads as $ad)
|
@foreach ($ads as $ad)
|
||||||
@if ($ad->ad_categories_id == 14)
|
@if ($ad->ad_categories_id == 14 && now()->isBefore($ad->valid_till))
|
||||||
<a href="{{ $ad->link }}">
|
<a href="{{ $ad->link }}">
|
||||||
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
||||||
</a>
|
</a>
|
||||||
|
@ -75,14 +75,14 @@
|
|||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<aside class="widget-area mt-50">
|
<aside class="widget-area mt-50">
|
||||||
@foreach ($adsWithChildren as $items)
|
@foreach ($adsWithChildren as $items)
|
||||||
@if ($items->ad_categories_id == 7)
|
@if ($items->ad_categories_id == 7 && now()->isBefore($items->valid_till))
|
||||||
<section class="widget widget_featured_reports">
|
<section class="widget widget_featured_reports">
|
||||||
<img src="{{ asset($items->thumb) }}" alt="{{ $items->title }}" class="img-fluid">
|
<img src="{{ asset($items->thumb) }}" alt="{{ $items->title }}" class="img-fluid">
|
||||||
</section>
|
</section>
|
||||||
@endif
|
@endif
|
||||||
@if ($items->children->isNotEmpty())
|
@if ($items->children->isNotEmpty())
|
||||||
@foreach ($items->children as $item)
|
@foreach ($items->children as $item)
|
||||||
@if ($item->ad_categories_id == 7)
|
@if ($item->ad_categories_id == 7 && now()->isBefore($item->valid_till))
|
||||||
<section class="widget widget_featured_reports">
|
<section class="widget widget_featured_reports">
|
||||||
<img src="{{ asset($item->thumb) }}" alt="{{ $item->title }}"
|
<img src="{{ asset($item->thumb) }}" alt="{{ $item->title }}"
|
||||||
class="img-fluid">
|
class="img-fluid">
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
@if ($ads->isNotEmpty())
|
@if ($ads->isNotEmpty())
|
||||||
@foreach ($ads as $ad)
|
@foreach ($ads as $ad)
|
||||||
@if ($ad->ad_categories_id == 6)
|
@if ($ad->ad_categories_id == 6 && now()->isBefore($ad->valid_till))
|
||||||
<a href="{{ $ad->link }}">
|
<a href="{{ $ad->link }}">
|
||||||
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
<img src="{{ asset($ad->thumb) }}" alt="{{ $ad->title }}" class="img-fluid">
|
||||||
</a>
|
</a>
|
||||||
|
@ -21,13 +21,14 @@
|
|||||||
@if ($loop->first)
|
@if ($loop->first)
|
||||||
<div class="single-culture-news">
|
<div class="single-culture-news">
|
||||||
<div class="">
|
<div class="">
|
||||||
<a href="{{route('newsDetail', ['alias' => $item->alias])}}">
|
<a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
|
||||||
<img src="{{ asset($item->thumb) }}" alt="image">
|
<img src="{{ asset($item->thumb) }}" alt="image">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="culture-news-content">
|
<div class="culture-news-content">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="{{route('newsDetail', ['alias' => $item->alias])}}">{{ $item->title }}</a>
|
<a
|
||||||
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->title }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -46,7 +47,7 @@
|
|||||||
<div class="row align-items-center">
|
<div class="row align-items-center">
|
||||||
<div class="col-lg-4 col-sm-4">
|
<div class="col-lg-4 col-sm-4">
|
||||||
<div class="culture-news-image">
|
<div class="culture-news-image">
|
||||||
<a href="{{route('newsDetail', ['alias' => $item->alias])}}">
|
<a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
|
||||||
<img src="{{ asset($item->thumb) }}" alt="image">
|
<img src="{{ asset($item->thumb) }}" alt="image">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -54,7 +55,8 @@
|
|||||||
<div class="col-lg-8 col-sm-8">
|
<div class="col-lg-8 col-sm-8">
|
||||||
<div class="culture-news-content">
|
<div class="culture-news-content">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="{{route('newsDetail', ['alias' => $item->alias])}}">{{ $item->title }}</a>
|
<a
|
||||||
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->title }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -73,7 +75,7 @@
|
|||||||
<div class="row align-items-center">
|
<div class="row align-items-center">
|
||||||
<div class="col-lg-4 col-sm-4">
|
<div class="col-lg-4 col-sm-4">
|
||||||
<div class="culture-news-image">
|
<div class="culture-news-image">
|
||||||
<a href="{{route('newsDetail', ['alias' => $item->alias])}}">
|
<a href="{{ route('newsDetail', ['alias' => $item->alias]) }}">
|
||||||
<img src="{{ asset($item->thumb) }}" alt="image">
|
<img src="{{ asset($item->thumb) }}" alt="image">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -81,7 +83,8 @@
|
|||||||
<div class="col-lg-8 col-sm-8">
|
<div class="col-lg-8 col-sm-8">
|
||||||
<div class="culture-news-content">
|
<div class="culture-news-content">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="{{route('newsDetail', ['alias' => $item->alias])}}">{{ $item->title }}</a>
|
<a
|
||||||
|
href="{{ route('newsDetail', ['alias' => $item->alias]) }}">{{ $item->title }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -90,7 +93,6 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
@yield('meta')
|
||||||
|
<meta property="og:image"
|
||||||
|
content="https://ahrefs.com/blog/wp-content/uploads/2019/12/fb-how-to-become-an-seo-expert.png" />
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta name="description" content="Hulaki Khabar">
|
<meta name="description" content="Hulaki Khabar">
|
||||||
@ -29,6 +32,14 @@
|
|||||||
<link rel="stylesheet" href="{{ asset('hulaki/assets/css/dark.css') }}">
|
<link rel="stylesheet" href="{{ asset('hulaki/assets/css/dark.css') }}">
|
||||||
<!-- Responsive CSS -->
|
<!-- Responsive CSS -->
|
||||||
<link rel="stylesheet" href="{{ asset('hulaki/assets/css/responsive.css') }}">
|
<link rel="stylesheet" href="{{ asset('hulaki/assets/css/responsive.css') }}">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css"
|
||||||
|
integrity="sha512-q3eWabyZPc1XTCmF+8/LuE1ozpg5xxn7iO89yfSOd5/oKvyqLngoNGsx8jq92Y8eXJ/IRxQbEC+FGSYxtk2oiw=="
|
||||||
|
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<title>हुलाकी खबर </title>
|
<title>हुलाकी खबर </title>
|
||||||
|
|
||||||
@ -90,6 +101,7 @@
|
|||||||
<script src="{{ asset('hulaki/assets/js/wow.min.js') }}"></script>
|
<script src="{{ asset('hulaki/assets/js/wow.min.js') }}"></script>
|
||||||
<!-- Custom JS -->
|
<!-- Custom JS -->
|
||||||
<script src="{{ asset('hulaki/assets/js/main.js') }}"></script>
|
<script src="{{ asset('hulaki/assets/js/main.js') }}"></script>
|
||||||
|
<script src="{{ asset('js/share.js') }}"></script>
|
||||||
@stack('js')
|
@stack('js')
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@ -1,4 +1,64 @@
|
|||||||
@extends('hulaki_khabar.layout.layout')
|
@extends('hulaki_khabar.layout.layout')
|
||||||
|
@section('meta')
|
||||||
|
<meta property="og:title" content="{{ $news->title }}" />
|
||||||
|
<meta property="og:description"
|
||||||
|
content="{{ $news->title}}" />
|
||||||
|
<meta property="og:image" content="{{ asset($news->thumb) }}" />
|
||||||
|
@endsection
|
||||||
|
@push('css')
|
||||||
|
@push('css')
|
||||||
|
<style>
|
||||||
|
#social-links {
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#social-links ul li {
|
||||||
|
display: inline-block;
|
||||||
|
/* width: 140px; */
|
||||||
|
/* height: 10px; */
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#social-links ul li a {
|
||||||
|
background-color: white;
|
||||||
|
color: black;
|
||||||
|
border: 2px solid rgb(166, 12, 12);
|
||||||
|
border-radius: 20px;
|
||||||
|
/* padding: 10px 5px 40px 5px; */
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
height: 40px;
|
||||||
|
width: 140px;
|
||||||
|
font-size: 23px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#social-links ul li a:hover,
|
||||||
|
#social-links ul li a:hover :active {
|
||||||
|
background-color: #bc4633;
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text,
|
||||||
|
.text {
|
||||||
|
background-color: #f44336;
|
||||||
|
color: white;
|
||||||
|
padding: 14px 20px;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text:hover,
|
||||||
|
.text:active {
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@endpush
|
||||||
|
@endpush
|
||||||
@section('content')
|
@section('content')
|
||||||
<section class="default-news-area pt-5">
|
<section class="default-news-area pt-5">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@ -23,9 +83,12 @@
|
|||||||
<div class="col-lg-9 col-md-9">
|
<div class="col-lg-9 col-md-9">
|
||||||
<div class="blog-details-desc">
|
<div class="blog-details-desc">
|
||||||
<h3 id="sidebar">{{ $news->title }}</h3>
|
<h3 id="sidebar">{{ $news->title }}</h3>
|
||||||
<div class="article-image">
|
<div class="article-image pb-5">
|
||||||
<img src="{{ asset($news->thumb) }}" alt="image">
|
<img src="{{ asset($news->thumb) }}" alt="image">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="container mt-4">
|
||||||
|
{!! $shareComponent !!}
|
||||||
|
</div>
|
||||||
<div class="article-content">
|
<div class="article-content">
|
||||||
<div class="sports-news-content">
|
<div class="sports-news-content">
|
||||||
<p style="font: bold;">{{ $news->short_description }}</p>
|
<p style="font: bold;">{{ $news->short_description }}</p>
|
||||||
|
30
resources/views/hulaki_khabar/popup/popup-modal.blade.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||||
|
aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
|
||||||
|
<div class="modal-content" style="border-radius: 10px;">
|
||||||
|
<div class="modal-body text-center p-0 rounded"
|
||||||
|
style="background-image: url('{{ asset($popup->image) }}'); background-size: cover;">
|
||||||
|
<div class="row" style="height: 30em;">
|
||||||
|
<div class="col-6" style="height: 100%; width: 100%;">
|
||||||
|
<img src="{{ $popup->image }}">
|
||||||
|
</div>
|
||||||
|
<div class="col-6 d-flex align-items-center">
|
||||||
|
<div class="text-left p-4" style="position: relative">
|
||||||
|
<h3 class="mb-4" style="text-transform: uppercase;">{{ $popup->title }}</h3>
|
||||||
|
<p style="text-align: justify;">{!! $popup->description !!}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@push('js')
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#exampleModal').modal('show');
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
@endpush
|
15
routes/CRUDgenerated/route.popups.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
use App\Http\Controllers\PopupsController;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
Route::prefix("popups")->group(function () {
|
||||||
|
Route::get('/', [PopupsController::class, 'index'])->name('popups.index');
|
||||||
|
Route::get('/create', [PopupsController::class, 'create'])->name('popups.create');
|
||||||
|
Route::post('/store', [PopupsController::class, 'store'])->name('popups.store');
|
||||||
|
Route::post('/sort', [PopupsController::class, 'sort'])->name('popups.sort');
|
||||||
|
Route::post('/updatealias', [PopupsController::class, 'updatealias'])->name('popups.updatealias');
|
||||||
|
Route::get('/show/{id}', [PopupsController::class, 'show'])->name('popups.show');
|
||||||
|
Route::get('/edit/{id}', [PopupsController::class, 'edit'])->name('popups.edit') ;
|
||||||
|
Route::post('/update/{id}', [PopupsController::class, 'update'])->name('popups.update');
|
||||||
|
Route::delete('/destroy/{id}', [PopupsController::class, 'destroy'])->name('popups.destroy');
|
||||||
|
Route::get('/toggle/{id}', [PopupsController::class, 'toggle'])->name('popups.toggle');
|
||||||
|
});
|
15
routes/route.popups.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
use App\Http\Controllers\PopupsController;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
Route::prefix("popups")->group(function () {
|
||||||
|
Route::get('/', [PopupsController::class, 'index'])->name('popups.index');
|
||||||
|
Route::get('/create', [PopupsController::class, 'create'])->name('popups.create');
|
||||||
|
Route::post('/store', [PopupsController::class, 'store'])->name('popups.store');
|
||||||
|
Route::post('/sort', [PopupsController::class, 'sort'])->name('popups.sort');
|
||||||
|
Route::post('/updatealias', [PopupsController::class, 'updatealias'])->name('popups.updatealias');
|
||||||
|
Route::get('/show/{id}', [PopupsController::class, 'show'])->name('popups.show');
|
||||||
|
Route::get('/edit/{id}', [PopupsController::class, 'edit'])->name('popups.edit') ;
|
||||||
|
Route::post('/update/{id}', [PopupsController::class, 'update'])->name('popups.update');
|
||||||
|
Route::delete('/destroy/{id}', [PopupsController::class, 'destroy'])->name('popups.destroy');
|
||||||
|
Route::get('/toggle/{id}', [PopupsController::class, 'toggle'])->name('popups.toggle');
|
||||||
|
});
|
@ -112,6 +112,7 @@ Route::middleware('auth')->group(function () {
|
|||||||
require __DIR__ . '/route.roles.php';
|
require __DIR__ . '/route.roles.php';
|
||||||
require __DIR__ . '/route.permissions.php';
|
require __DIR__ . '/route.permissions.php';
|
||||||
require __DIR__ . '/route.users.php';
|
require __DIR__ . '/route.users.php';
|
||||||
|
require __DIR__ . '/route.popups.php';
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
BIN
storage/app/public/hulaki/files/7/404.png
Normal file
After Width: | Height: | Size: 335 KiB |
BIN
storage/app/public/hulaki/files/7/ads1.gif
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
storage/app/public/hulaki/files/7/ads3.jpg
Normal file
After Width: | Height: | Size: 361 KiB |
BIN
storage/app/public/hulaki/files/7/ads4.jpg
Normal file
After Width: | Height: | Size: 360 KiB |
BIN
storage/app/public/hulaki/files/7/ads5.jpg
Normal file
After Width: | Height: | Size: 523 KiB |
BIN
storage/app/public/hulaki/photos/7/add1.gif
Normal file
After Width: | Height: | Size: 174 KiB |
BIN
storage/app/public/hulaki/photos/7/ads1.gif
Normal file
After Width: | Height: | Size: 62 KiB |