<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class W3crmAdminController extends Controller
{
    public function upload(Request $request)
    {
    if ($request->hasFile('file')) {
        foreach ($request->file('file') as $file) {
            $filename = $file->getClientOriginalName();
            $file->storeAs('uploads', $filename, 'public');
        }
        return response()->json(['message' => 'Files uploaded successfully']);
    }

    return response()->json(['error' => 'No file uploaded'], 400);
    }
    public function store(Request $request)
    {
        $validated = $request->validate([
            'title' => 'required|string|max:255',
            'content' => 'required|string',
        ]);
        \App\Models\Post::create($validated);
        return redirect()->back()->with('success', 'Post created successfully.');
    }
    public function dashboard(){
		$page_title = 'Dashboard';
        $page_description = 'Some description for the page';
		return view('W3crm.dashboard.index', compact('page_title', 'page_description'));
	}
    public function dashboard_2(){
        $page_title = 'Dashboard';
        $page_description = 'Some description for the page';
        return view('W3crm.dashboard.index_2', compact('page_title', 'page_description'));
    }
    public function employee(){
        $page_title = 'Employee ';
        $page_description = 'Some description for the page';
        return view('W3crm.dashboard.employee', compact('page_title', 'page_description'));
    }
    public function core_hr(){
        $page_title = 'Core Hr';
        $page_description = 'Some description for the page';
        return view('W3crm.dashboard.core_hr', compact('page_title', 'page_description'));
    }

    public function finance(){
        $page_title = 'Finance';
        $page_description = 'Some description for the page';
        return view('W3crm.dashboard.finance', compact('page_title', 'page_description'));
    }

    public function task(){
        $page_title = 'Task';
        $page_description = 'Some description for the page';
        return view('W3crm.tasks.task', compact('page_title', 'page_description'));
    }

    public function task_summary(){
        $page_title = 'Task Summary';
        $page_description = 'Some description for the page';
        return view('W3crm.tasks.task_summary', compact('page_title', 'page_description'));
    }
    public function performance(){
        $page_title = 'Performance ';
        $page_description = 'Some description for the page';
        return view('W3crm.dashboard.performance', compact('page_title', 'page_description'));
    }
    public function project(){
        $page_title = 'Project ';
        $page_description = 'Some description for the page';
        return view('W3crm.dashboard.project', compact('page_title', 'page_description'));
    }
    public function manage_client(){
        $page_title = 'Manage Client  ';
        $page_description = 'Some description for the page';
        return view('W3crm.dashboard.manage_client', compact('page_title', 'page_description'));
    }
    public function reports(){
        $page_title = 'Reports ';
        $page_description = 'Some description for the page';
        return view('W3crm.dashboard.reports', compact('page_title', 'page_description'));
    }
    public function chat(){
        $page_title = 'Chat ';
        $page_description = 'Some description for the page';
        return view('W3crm.app.chat', compact('page_title', 'page_description'));
    }
    public function user(){
        $page_title = 'User ';
        $page_description = 'Some description for the page';
        return view('W3crm.users.user', compact('page_title', 'page_description'));
    }
    public function user_roles(){
        $page_title = 'User Roles ';
        $page_description = 'Some description for the page';
        return view('W3crm.users.user_role', compact('page_title', 'page_description'));
    }
    public function add_role (){
        $page_title = 'Add Role ';
        $page_description = 'Some description for the page';
        return view('W3crm.users.add_role', compact('page_title', 'page_description'));
    }
    public function edit_profile (){
        $page_title = 'Profile';
        $page_description = 'Some description for the page';
        return view('W3crm.app.edit_profile', compact('page_title', 'page_description'));
    }
    public function app_profile_2 (){
        $page_title = 'Profile';
        $page_description = 'Some description for the page';
        return view('W3crm.app.profile_2', compact('page_title', 'page_description'));
    }
    public function app_profile(){
        $page_title = 'Profile';
        $page_description = 'Some description for the page';
        return view('W3crm.app.profile', compact('page_title', 'page_description'));
    }
    public function customer(){
        $page_title = 'Customers';
        $page_description = 'Some description for the page';
        return view('W3crm.customers.customer', compact('page_title', 'page_description'));
    }
    public function customer_profile(){
        $page_title = 'Customer Profile';
        $page_description = 'Some description for the page';
        return view('W3crm.customers.customer_profile', compact('page_title', 'page_description'));
    }
    public function contacts (){
        $page_title = 'Contacts ';
        $page_description = 'Some description for the page';
        return view('W3crm.app.contacts', compact('page_title', 'page_description'));
    }
    public function email_read(){
        $page_title = 'Read';
        $page_description = 'Some description for the page';
        return view('W3crm.message.read', compact('page_title', 'page_description'));
    }
    public function email_compose(){
        $page_title = 'Compose';
        $page_description = 'Some description for the page';
        return view('W3crm.message.compose', compact('page_title', 'page_description'));
    }
    public function email_inbox(){
        $page_title = 'Inbox';
        $page_description = 'Some description for the page';
        return view('W3crm.message.inbox', compact('page_title', 'page_description'));
    }
    public function app_calender(){
        $page_title = 'Calendar';
        $page_description = 'Some description for the page';
        return view('W3crm.app.calender', compact('page_title', 'page_description'));
    }

    public function ecom_product_grid(){
        $page_title = 'Product Grid';
        $page_description = 'Some description for the page';
        return view('W3crm.ecom.product_grid', compact('page_title', 'page_description'));
    }
    public function ecom_product_list(){
        $page_title = 'Product List';
        $page_description = 'Some description for the page';
        return view('W3crm.ecom.product_list', compact('page_title', 'page_description'));
    }
    public function ecom_product_detail(){
        $page_title = 'Product Detail';
        $page_description = 'Some description for the page';
        return view('W3crm.ecom.product_detail', compact('page_title', 'page_description'));
    }
    public function ecom_product_order(){
        $page_title = 'Product Order';
        $page_description = 'Some description for the page';
        return view('W3crm.ecom.product_order', compact('page_title', 'page_description'));
    }
    public function ecom_checkout(){
        $page_title = 'Checkout';
        $page_description = 'Some description for the page';
        return view('W3crm.ecom.checkout', compact('page_title', 'page_description'));
    }
    public function ecom_invoice(){
        $page_title = 'Invoice';
        $page_description = 'Some description for the page';
        return view('W3crm.ecom.invoice', compact('page_title', 'page_description'));
    }
    public function ecom_customers(){
        $page_title = 'Customers';
        $page_description = 'Some description for the page';
        return view('W3crm.ecom.customers', compact('page_title', 'page_description'));
    }
    public function page_login (){
        $page_title = 'Login';
        $page_description = 'Some description for the page';
        return view('W3crm.page.login', compact('page_title', 'page_description'));
    }
    public function page_register(){
        $page_title = 'Register';
        $page_description = 'Some description for the page';
        return view('W3crm.page.register', compact('page_title', 'page_description'));
    }
    public function page_forgot_password(){
        $page_title = 'Forgot Password';
        $page_description = 'Some description for the page';
        return view('W3crm.page.forgot_password', compact('page_title', 'page_description'));
    }

    public function page_error_400(){
        $page_title = 'Error 400';
        $page_description = 'Some description for the page';
        return view('W3crm.page.error_400', compact('page_title', 'page_description'));
    }
    public function page_error_403(){
        $page_title = 'Error 403';
        $page_description = 'Some description for the page';
        return view('W3crm.page.error_403', compact('page_title', 'page_description'));
    }
    public function page_error_404(){
        $page_title = 'Error 404';
        $page_description = 'Some description for the page';
        return view('W3crm.page.error_404', compact('page_title', 'page_description'));
    }
    public function page_error_500(){
        $page_title = 'Error 500';
        $page_description = 'Some description for the page';
        return view('W3crm.page.error_500', compact('page_title', 'page_description'));
    }
    public function page_error_503(){
        $page_title = 'Error 503';
        $page_description = 'Some description for the page';
        return view('W3crm.page.error_503', compact('page_title', 'page_description'));
    }
    public function page_empty_page(){
        $page_title = 'Dashboard';
        $page_description = 'Some description for the page';
        return view('W3crm.page.empty_page', compact('page_title', 'page_description'));
    }

    public function page_lock_screen(){
        $page_title = 'Lock Screen';
        $page_description = 'Some description for the page';
        return view('W3crm.page.lock_screen', compact('page_title', 'page_description'));
    }
    public function cms_add_blog()
    {
        $page_title = 'Add Blog';
        $page_description = 'Some description for the page';
        return view('W3crm.cms.add_blog', compact('page_title', 'page_description'));
    }
    public function cms_add_email()
    {
        $page_title = 'Add Email';
        $page_description = 'Some description for the page';
        return view('W3crm.cms.add_email', compact('page_title', 'page_description'));
    }
    public function cms_blog()
    {
        $page_title = 'Blog';
        $page_description = 'Some description for the page';
        return view('W3crm.cms.blog', compact('page_title', 'page_description'));
    }
    public function cms_blog_category()
    {
        $page_title = 'Blog Category';
        $page_description = 'Some description for the page';
        return view('W3crm.cms.blog_category', compact('page_title', 'page_description'));
    }
    public function cms_email_template()
    {
        $page_title = 'Email Template';
        $page_description = 'Some description for the page';
        return view('W3crm.cms.email_template', compact('page_title', 'page_description'));
    }    
    public function cms_content()
    {
        $page_title = 'Content';
        $page_description = 'Some description for the page';
        return view('W3crm.cms.content', compact('page_title', 'page_description'));
    }
    public function cms_content_add()
    {
        $page_title = 'Add Content';
        $page_description = 'Some description for the page';
        return view('W3crm.cms.content_add', compact('page_title', 'page_description'));
    }
    public function cms_menu()
    {
        $page_title = 'Menus';
        $page_description = 'Some description for the page';
        return view('W3crm.cms.menu', compact('page_title', 'page_description'));
    }
    public function blog(){
        $page_title = 'Blog';
        $page_description = 'Some description for the page';
        return view('W3crm.blog.blog', compact('page_title', 'page_description'));
    }
    public function aikit_auto_write(){
        $page_title = 'Blog Category';
        $page_description = 'Some description for the page';
        return view('W3crm.aikit.auto_write ', compact('page_title', 'page_description'));
    }
    public function aikit_scheduled(){
        $page_title = 'Scheduled';
        $page_description = 'Some description for the page';
        return view('W3crm.aikit.scheduled ', compact('page_title', 'page_description'));
    }
    public function aikit_repurpose(){
        $page_title = 'Repurpose';
        $page_description = 'Some description for the page';
        return view('W3crm.aikit.repurpose', compact('page_title', 'page_description'));
    }
    public function aikit_rss(){
        $page_title = 'Rss';
        $page_description = 'Some description for the page';
        return view('W3crm.aikit.rss ', compact('page_title', 'page_description'));
    }
    public function aikit_chatbot (){
        $page_title = 'chatbot';
        $page_description = 'Some description for the page';
        return view('W3crm.aikit.chatbot ', compact('page_title', 'page_description'));
    }
    public function aikit_fine_tune_models(){
        $page_title = 'Fine tune models';
        $page_description = 'Some description for the page';
        return view('W3crm.aikit.fine_tune_models  ', compact('page_title', 'page_description'));
    }
    public function aikit_prompt(){
        $page_title = 'Prompt';
        $page_description = 'Some description for the page';
        return view('W3crm.aikit.prompt', compact('page_title', 'page_description'));
    }
    public function aikit_setting(){
        $page_title = 'Setting';
        $page_description = 'Some description for the page';
        return view('W3crm.aikit.setting' , compact('page_title', 'page_description'));
    }
    public function aikit_import(){
        $page_title = 'import';
        $page_description = 'Some description for the page';
        return view('W3crm.aikit.import', compact('page_title', 'page_description'));
    }
    public function post_details (){
        $page_title = 'Post Details';
        $page_description = 'Some description for the page';
        return view('W3crm.users.post_details ', compact('page_title', 'page_description'));
    }
    public function account_activity(){
        $page_title = 'Activity';
        $page_description = 'Some description for the page';
        return view('W3crm.account.activity ', compact('page_title', 'page_description'));
    }
    public function account_api_keys(){
        $page_title = 'API Keyes';
        $page_description = 'Some description for the page';
        return view('W3crm.account.api_keys ', compact('page_title', 'page_description'));
    }
    public function account_billing(){
        $page_title = 'Billing';
        $page_description = 'Some description for the page';
        return view('W3crm.account.billing ', compact('page_title', 'page_description'));
    }
    public function account_logs(){
        $page_title = 'Logs';
        $page_description = 'Some description for the page';
        return view('W3crm.account.logs ', compact('page_title', 'page_description'));
    }
    public function account_overview(){
        $page_title = 'Overview';
        $page_description = 'Some description for the page';
        return view('W3crm.account.overview ', compact('page_title', 'page_description'));
    }
    public function account_referrals(){
        $page_title = 'Referrals';
        $page_description = 'Some description for the page';
        return view('W3crm.account.referrals ', compact('page_title', 'page_description'));
    }
    public function account_security(){
        $page_title = 'Settings';
        $page_description = 'Some description for the page';
        return view('W3crm.account.security ', compact('page_title', 'page_description'));
    }
    public function account_settings(){
        $page_title = 'Post Details';
        $page_description = 'Some description for the page';
        return view('W3crm.account.settings ', compact('page_title', 'page_description'));
    }
    public function account_statements(){
        $page_title = 'Statements';
        $page_description = 'Some description for the page';
        return view('W3crm.account.statements ', compact('page_title', 'page_description'));
    }
    public function profile_activity(){
        $page_title = 'Activity';
        $page_description = 'Some description for the page';
        return view('W3crm.profile.activity', compact('page_title', 'page_description'));
    }
    public function profile_campaigns(){
        $page_title = 'Campaigns';
        $page_description = 'Some description for the page';
        return view('W3crm.profile.campaigns', compact('page_title', 'page_description'));
    }
    public function profile_documents(){
        $page_title = 'Documents';
        $page_description = 'Some description for the page';
        return view('W3crm.profile.documents', compact('page_title', 'page_description'));
    }
    public function profile_followers(){
        $page_title = 'Followers';
        $page_description = 'Some description for the page';
        return view('W3crm.profile.followers', compact('page_title', 'page_description'));
    }
    public function profile_overview(){
        $page_title = 'Overview';
        $page_description = 'Some description for the page';
        return view('W3crm.profile.overview', compact('page_title', 'page_description'));
    }
    public function profile_projects_details(){
        $page_title = 'Projects Details';
        $page_description = 'Some description for the page';
        return view('W3crm.profile.projects_details', compact('page_title', 'page_description'));
    }
    public function profile_projects(){
        $page_title = 'Projects';
        $page_description = 'Some description for the page';
        return view('W3crm.profile.projects', compact('page_title', 'page_description'));
    }
}
