samalapsy

Web Developer at Seriex4 LTD

Hire Me

Experience

3,310

3 Best Reply Awards

  • Member Since 3 Months Ago
  • 0 Lessons Completed
  • 1 Favorite

13th June, 2017

samalapsy started a new conversation Show Friendly 500 Error And Also Display Database Errors Friendly • 1 week ago

Please how can I customize the laravel 500 error view and prevent my app from showing the Laravel 500 Error views when there's a database error..

Thanks in Anticipation.

samalapsy started a new conversation Use The Same Login Form For Multiple Account Login • 2 weeks ago

I have 2 Different Customs guards and Authentication which are

  1. Admin Guard
  2. Schools Guard

Each guard table (admin, schools) Please how can I use the same login form and url for both account types and also redirect each to them to their respective dashboard

11th June, 2017

samalapsy left a reply on Pass Value To Laravel Named Routing From Javascript • 2 weeks ago

@alex-greaves I'm not using vueJS...Just normal Jquery

samalapsy started a new conversation Pass Value To Laravel Named Routing From Javascript • 2 weeks ago

I want to add a value to my named routing from javascript

This is my route 

{{ route('admin.edit_school', ['slug' => $variable_here]) }}

This is what I tried but it's not working

var slug = $(this).data('row-abbreviation');
var url = "{{ route('admin.edit_school', ['slug' => \"+  \"]) }}";
window.location.href=url;

Please how can I achieve this..

6th June, 2017

samalapsy left a reply on Image Intervention - Image Source Not Readable • 2 weeks ago

Already solved it...I had to remove the

public_path()

because it's adding public to my image link.

I say a very big thank you to @fraserk for your time, effort and support.

Thanks man, Thank You Everyone.

samalapsy left a reply on Sub-domain And Main Domain Using Same Laravel Application • 2 weeks ago

@alexhiggins yes you're right pleae can you help me out with an example..?

samalapsy left a reply on Sub-domain And Main Domain Using Same Laravel Application • 2 weeks ago

Thank you @alexhiggins ... @alexhiggins and @tekmi..I want to have it in such a way the each domain and access different urls and at the same time access some specific urls. Please how can I go about that?

samalapsy left a reply on Sub-domain And Main Domain Using Same Laravel Application • 2 weeks ago

oH Alright then.. Thanks @tekmi

samalapsy left a reply on Sub-domain And Main Domain Using Same Laravel Application • 2 weeks ago

@tekmi Thanks..I've having a challenge with payment over here..Is there another way for me to get this tutorial..?

samalapsy left a reply on Image Intervention - Image Source Not Readable • 2 weeks ago

@fraserk I already did but still the same thing

samalapsy left a reply on Image Intervention - Image Source Not Readable • 2 weeks ago

@fraserk yes it is on the server

samalapsy left a reply on Image Intervention - Image Source Not Readable • 2 weeks ago

@fraserk yes. This line

$watermark = Image::make(public_path('img/logo.png'));

Pointing to this particulary code

public_path('img/logo.png')

samalapsy left a reply on Sub-domain And Main Domain Using Same Laravel Application • 2 weeks ago

@tykus..Thank you but pls is there a way to get a video tutorial link towards that..?

samalapsy started a new conversation Image Intervention - Image Source Not Readable • 2 weeks ago

I want to add watermark to my images but It's throwing the error "Image source not Readable". I've used it on my local host and it worked fine. Please kinldy help me check what's wrong. Thank You.

I've tried this

        $fileName = "img-".$key. "." . strtolower($image->getClientOriginalExtension());
                $img = Image::make($image->getRealPath());
                $watermark = Image::make(public_path('img/logo.png'));
                $img->insert($watermark)->save($path.'/'.$fileName);

and this

$fileName = "img-".$key. "." . strtolower($image->getClientOriginalExtension());
                $img = Image::make($image->getRealPath());
                $img->insert(public_path('img/logo.png'))->save($path.'/'.$fileName);

But all still give the same Image not readable error

samalapsy started a new conversation Sub-domain And Main Domain Using Same Laravel Application • 2 weeks ago

I have these domain

maindomain.xyz and sub.maindomain.xys

The above domains access the same DB just that one is client url and the other is ad admin url

Please how can I use same Laravel application for both domain on my server..

Thanks

5th June, 2017

samalapsy left a reply on Adding Watermark To Image Using Image Intervention • 3 weeks ago

Gotten the answer I only removed this line

 $move = $image->move($destinationPath, $fileName);

samalapsy started a new conversation Adding Watermark To Image Using Image Intervention • 3 weeks ago

Please how can I add watermark to my uploaded image. It's working with the code below.

$image = $request->file('banner');
$slug= "bgh-dsd";
$key=0;
$fileName = "img-".$slug."-".$key. "." . strtolower($image->getClientOriginalExtension());
                $destinationPath = $path;


                
                //Upload Images One After the Order into folder
                $img = Image::make($image->getRealPath());
                $watermark = Image::make(public_path('/img/logo.png'));                
                $img->insert($watermark, 'bottom-right', 10, 10);
                $img->save($destinationPath.'/'.$fileName);
                $move = $image->move($destinationPath, $fileName);

Thanks In Anticipation

samalapsy left a reply on Upload Multiple Images To Server Using Image Intervention • 3 weeks ago

I've gotten the Solution Thanks Everyone

samalapsy started a new conversation Upload Multiple Images To Server Using Image Intervention • 3 weeks ago

public function saveImages(Request $request)
    {

        $images = $request->file('hostel_image_files');

        
        $slug = session::get('new_hostel_slug');
        $folderName = $slug;
        $listingPath = $folderName ."/";
        $path = "uploads/listings/hostels/". $folderName ."/";

        

        //File Does not Exist
        if(!File::exists($path)) {
            File::makeDirectory($path, 0775, true);
        }

        //Add path to DB
        $hostel = Hostel::whereSlug($slug)->first();
        if (!is_null($hostel->images_id)) {
            $hostel->images_id = $listingPath;  // Path to where all listing images resides
            $hostel->save();
        }


        foreach ($images as $key => $image) {
            $rules = [
                'image' => 'required|image|mimes:jpeg,bmp,png|size:2048' //2MB Max Size
            ];

            $v = Validator::make($image, $rules);

            if ($v->fails()) {
                return redirect()->back()->withInput()->withErrors($v);
            }
            
            $fileName = $image->getClientOriginalName().getClientOriginalExtension();
            $destinationPath = $path;
            
            //Upload Images One After the Order into folder
            $img = Image::make($request->file('hostel_image_files'));
            $img->insert(public_path('img/logo.png'), 'bottom-right', 10, 10)->save($destinationPath.'/'.$fileName);
            $move = $image->move($destinationPath, $fileName);

            //Insert into DB and 
        }

        return redirect()->coute('create_hostel_step5');
    }

STACK ERROR LOG

[2017-06-05 04:57:35] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to Illuminate\Validation\Factory::make() must be of the type array, object given, called in C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 221 in C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Validation\Factory.php:98
Stack trace:
#0 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(221): Illuminate\Validation\Factory->make(Object(Illuminate\Http\UploadedFile), Array)
#1 C:\xampp\htdocs\mypadi\app\Http\Controllers\HostelController.php(680): Illuminate\Support\Facades\Facade::__callStatic('make', Array)
#2 [internal function]: App\Http\Controllers\HostelController->saveStep4(Object(Illuminate\Http\Request))
#3 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(55): call_user_func_array(Array, Array)
#4 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(44): Illuminate\Routing\Controller->callAction('saveStep4', Array)
#5 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\HostelController), 'saveStep4')
#6 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Route.php(160): Illuminate\Routing\Route->runController()
#7 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Router.php(574): Illuminate\Routing\Route->run()
#8 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#9 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Middleware\SubstituteBindings.php(41): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#10 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#11 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#12 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Auth\Middleware\Authenticate.php(43): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#13 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Auth\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#14 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#15 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(65): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#16 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#17 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#18 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#19 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#20 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#21 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(64): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#22 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#23 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#24 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#25 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#26 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#27 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(59): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#28 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#29 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#30 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#31 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Router.php(576): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#32 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Router.php(535): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#33 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Router.php(513): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#34 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(174): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#35 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#36 C:\xampp\htdocs\mypadi\vendor\barryvdh\laravel-debugbar\src\Middleware\Debugbar.php(51): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#37 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Barryvdh\Debugbar\Middleware\Debugbar->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#39 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#40 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#42 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#43 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#44 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#45 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ValidatePostSize.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#46 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#48 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#49 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#50 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#51 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#52 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(149): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#53 C:\xampp\htdocs\mypadi\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#54 C:\xampp\htdocs\mypadi\public\index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#55 {main}  

I have the above method to upload multiple images and add watermark on it using Image Intervention. This is the error I get while trying to save the image. Please help me out. IF there's another better and more professional and standard way to do it please help me out.

Thanks in Anticipation

3rd June, 2017

samalapsy left a reply on Updating Image(s) On A Listing Website • 3 weeks ago

@tekmi ImageIntervention

samalapsy left a reply on Updating Image(s) On A Listing Website • 3 weeks ago

@tekmi Alright Then..Thank You

samalapsy left a reply on Updating Image(s) On A Listing Website • 3 weeks ago

@tekmi The upload I'm talking about is to change the Image(s) that the post has...Would you think it's taking up the hosting space if I don't delete the previous images..?

samalapsy started a new conversation Updating Image(s) On A Listing Website • 3 weeks ago

Hello Everyone,

I have a challenge and don't know what to do in this scenario....I have a listing website that allows users to upload images either single or multiple per post. What should I do If a user wants to update or change an image(s) for a specific post....Should I delete the image(s) from the server and upload the new image(s) or I should leave it there and still upload the new image(s)..

Please if there's a better way to do this i'm very willing and happy to hear.

Thanks in Anticipation

18th May, 2017

samalapsy left a reply on Optimize Slow Login On Website • 1 month ago

@AhimbisibweRoland I've added index and it still remains the same

samalapsy left a reply on Optimize Slow Login On Website • 1 month ago

@martinbean This is how my DB Looks Like

- fullname
- phoneno
- email
- password
- fb_id
- school
- course
- created_at
- updated_at

The Login actions is checking the phoneno and password credentials.

samalapsy left a reply on Flash Notification Error • 1 month ago

@DAVY_YG

CHANGE

@if (session()->has('flash_notification.message'))

TO

@if (Session::has('flash_notification.message'))

AND

{!!  session()->get('flash_notification.message') !!}
``

TO

{{ Session::get('flash_notification.message') }}


Hope it helpful

samalapsy started a new conversation Optimize Slow Login On Website • 1 month ago

I'm trying to login into my website of over 300, 000 user record. I use MySql as my DB. Whenever Users try to login, it would take up to 2 minutes before it logged them in, How can I optimize my login to below 5 seconds or less.

Thanks you

10th May, 2017

samalapsy left a reply on Array Values In Mass Assignment • 1 month ago

@ bunnypro Thanks Man

@tykus I will say, that if you are storing an array (of selected checkboxes????) then you are probably missing an entity in your domain

Please tell me what I'm missing should In case I want to work with check boxes too.

Thanks You

samalapsy left a reply on Array Values In Mass Assignment • 1 month ago

@tykus how can I get that done since I'm using create method in my controller?

samalapsy started a new conversation Array Values In Mass Assignment • 1 month ago

##Model Fillables

protected $fillable = ['name', 'phone', 'email', 'area', 'duration', 'platform', 'quality', 'security', 'has_equipment', 'equipments', 'ipaddress', 'location', 'status'];

##Controller Code

public function postLiveStream(Request $request)
    {
        try{
            @$geo = unserialize(file_get_contents("http://ip-api.com/php"));            
            $country = $geo["country"];
            $city = $geo["city"];            
            $location = $city. ", " . $country;    
        }catch(Exception $e){
            Log::error($e);
        }

        $data = $request->all();
        $stream = LiveStream::create($data);        
        
        if ($stream) {
            return response()->json([
                'status' => 200,
                'message' => 'saved',
            ])->header('Content-Type', 'application/json');
        }else{
            return response()->json([
                'status' => 500,
                'message' => 'not saved',
            ])->header('Content-Type', 'application/json');
        }
        
    }

##THIS IS MY ERROR

[2017-05-10 14:32:15] local.ERROR: ErrorException: Array to string conversion in C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\MySqlConnection.php:80
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Array to string...', 'C:\\xampp\\htdocs...', 80, Array)
#1 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\MySqlConnection.php(80): PDOStatement->bindValue(5, Array, 2)
#2 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Connection.php(447): Illuminate\Database\MySqlConnection->bindValues(Object(PDOStatement), Array)
#3 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Connection.php(640): Illuminate\Database\Connection->Illuminate\Database\{closure}('insert into `li...', Array)
#4 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Connection.php(607): Illuminate\Database\Connection->runQueryCallback('insert into `li...', Array, Object(Closure))
#5 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Connection.php(450): Illuminate\Database\Connection->run('insert into `li...', Array, Object(Closure))
#6 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Connection.php(404): Illuminate\Database\Connection->statement('insert into `li...', Array)
#7 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Query\Processors\Processor.php(32): Illuminate\Database\Connection->insert('insert into `li...', Array)
#8 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2131): Illuminate\Database\Query\Processors\Processor->processInsertGetId(Object(Illuminate\Database\Query\Builder), 'insert into `li...', Array, 'id')
#9 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php(1236): Illuminate\Database\Query\Builder->insertGetId(Array, 'id')
#10 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php(677): Illuminate\Database\Eloquent\Builder->__call('insertGetId', Array)
#11 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php(642): Illuminate\Database\Eloquent\Model->insertAndSetId(Object(Illuminate\Database\Eloquent\Builder), Array)
#12 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php(511): Illuminate\Database\Eloquent\Model->performInsert(Object(Illuminate\Database\Eloquent\Builder))
#13 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php(724): Illuminate\Database\Eloquent\Model->save()
#14 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Support\helpers.php(883): Illuminate\Database\Eloquent\Builder->Illuminate\Database\Eloquent\{closure}(Object(App\LiveStream))
#15 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php(725): tap(Object(App\LiveStream), Object(Closure))
#16 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php(1332): Illuminate\Database\Eloquent\Builder->create(Array)
#17 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php(1344): Illuminate\Database\Eloquent\Model->__call('create', Array)
#18 C:\xampp\htdocs\o\s4\app\Http\Controllers\SiteController.php(118): Illuminate\Database\Eloquent\Model::__callStatic('create', Array)
#19 [internal function]: App\Http\Controllers\SiteController->postLiveStream(Object(Illuminate\Http\Request))
#20 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(55): call_user_func_array(Array, Array)
#21 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(44): Illuminate\Routing\Controller->callAction('postLiveStream', Array)
#22 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Route.php(203): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\SiteController), 'postLiveStream')
#23 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Route.php(160): Illuminate\Routing\Route->runController()
#24 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Router.php(559): Illuminate\Routing\Route->run()
#25 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#26 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Middleware\SubstituteBindings.php(41): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#27 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#28 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#29 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(65): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#30 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#31 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#32 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#33 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#34 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#35 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(64): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#36 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#37 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#38 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#39 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#40 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#41 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(59): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#42 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#44 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#45 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Router.php(561): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#46 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Router.php(520): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#47 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Router.php(498): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#48 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(174): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#49 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#50 C:\xampp\htdocs\o\s4\vendor\barryvdh\laravel-debugbar\src\Middleware\Debugbar.php(51): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#51 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Barryvdh\Debugbar\Middleware\Debugbar->handle(Object(Illuminate\Http\Request), Object(Closure))
#52 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#53 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#54 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#55 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#56 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#57 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#58 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#59 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ValidatePostSize.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#60 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#61 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#62 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#63 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#64 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#65 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#66 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(149): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#67 C:\xampp\htdocs\o\s4\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#68 C:\xampp\htdocs\o\s4\public\index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#69 {main}

##NOTE

'platform' is an array

#My Questions

  1. Please how can I pass my array value into my database column
  2. Is It Secured to write my code this way..?

Thanks in Anticipation

9th May, 2017

samalapsy left a reply on Names Route On Group Routing • 1 month ago

@tykus Yeah I thought of this too but I'm thinking there should be another way around it, (i.e. The system would automatically detect the named routing using the groupname and the url..) #JustSaying

Thanks Bro

samalapsy started a new conversation Names Route On Group Routing • 1 month ago

I have this code here

Route::group(['as', 'services', 'prefix' => 'services'], function(){

    Route::get('/', [email protected]');

    Route::get('/digital-media', [email protected]');

    Route::get('/telecommunication', [email protected]');

    Route::get('/ict', [email protected]');

    Route::get('/academy', [email protected]');

});

My Question is How can I call the url(s) inside the group routing using the route() method in my blade.

Thanks in anticipation.

8th May, 2017

samalapsy left a reply on How Do I Fetch Users Not Assigned To A Particular Role. • 1 month ago

@VAIBHAV.SIDAPARA

This fetched all users not having the role id as "1"

public function users(){
 $users =  User::where('role', '!=', '1' )->get();

// Pass to your view
return view('users.index', compact('users'));
}

This fetched all users having the sent role

public function users($role_id){
 $users =  User::where('role', $role_id)->get();

// Pass to your view
return view('users.index', compact('users'));
}

Hope it helps...

21st April, 2017

samalapsy left a reply on Npm Run Dev Error, These Relative Modules Were Not Found: • 2 months ago

Oh the problem was my filenames! This stupid thing has wasted my whole time. Thanks a lot

Everyone has once had such experience. My Pleasure @pooreal

samalapsy left a reply on Npm Run Dev Error, These Relative Modules Were Not Found: • 2 months ago

@pooreal Of Course here...

public/css

samalapsy left a reply on Npm Run Dev Error, These Relative Modules Were Not Found: • 2 months ago

@pooreal please can you paste the stack log..?

samalapsy left a reply on Npm Run Dev Error • 2 months ago

@POOREAL in your terminal, Navigate to your project root and run

npm install

After the installing then run

npm run dev

Hope it helps

samalapsy left a reply on Unable To Connect To The Laravel Framework • 2 months ago

@davy_yg Check if the $user has any information, then Check for the objects name if they exist

samalapsy left a reply on Composer • 2 months ago

@davy_yg Which Localhost Service do you use. XAMP, WAMP.

samalapsy left a reply on Scripts File Not Updating In Laravel • 2 months ago

@aurawindsurfing For Next Time Change

<script src="{ { asset('/js/scripts.js') } }"></script>

to

<script src="{{ asset('/js/scripts.js') }}"></script>

samalapsy left a reply on Can Anyone Guide Me How To Display The Table With This Format In Laravel • 2 months ago

@JHANSI You can use the bootstrap table see http://getbootstrap.com/css/#tables

fetch your data using your controller, then pass it you your view using the compact methods.

Run a foreach Loop to display your data in the table

Hope it helps

samalapsy left a reply on Composer • 2 months ago

I also have copied the file to localhost. and when I try to run the file in localhost, all the file being open in the localhost instead of showing the final result of laravel.

@davy_yg type localhost/laravel_new_laravel/public

you'll see the Laravel Welcome Page

samalapsy left a reply on Uber Like Ondemand Service Webiste • 2 months ago

@jekinney I mean I want to build a platform Like Uber...or Let me say Clone Uber...Using Laravel.

20th April, 2017

samalapsy started a new conversation Uber Like Ondemand Service Webiste • 2 months ago

Hello,

Please can I build an ondemand platform like Uber using Laravel..? If Yes Pls can anyone share with me resources and tools I can make use of.

Thanks In Anticipation.

samalapsy started a new conversation Developing A Website For A Company Outside My Country <> Using Laravel • 2 months ago

I actually don't know how to go about it...This is my first time of doing and international Project. How would I go about it... In the area of quotations, costing, best infrastructure to use etc.

I want to develop a professional and standard website for an Arabian Construction Company. How can I go about it in terms of Pricing, and Product delivery.

I'm Open to new Ideas and Suggestion.

Thanks a Bunch.

samalapsy left a reply on Laravel 5.1.46 Middleware Weird Behaviour • 2 months ago

I hope I explained my question correctly.

Not Really though...

If I'm getting your question clear you want to remove the data in this session "$request->session()->remove('url.intended'); " each time your visit a new page. But You still wants it to keep the data when you're on Login Page Right...?

samalapsy left a reply on Laravel 5.1.46 Middleware Weird Behaviour • 2 months ago

@SHIROAMADA

Change

$request->session()->remove('url.intended'); 

TO

$request->session()->forget('url.intended'); //Removes session the Data
$request->session()->flush();  //Cleans all session variable

Hope It Helps..

19th April, 2017

samalapsy left a reply on MethodNotAllowedHttpException In RouteCollection.php Line 218: • 2 months ago

@jhansi you should have this code

return member::create([
            'Name' => $data['name'],
             'Team' => $data['Team'],
              'Vendor' => $data['Vendor'],
              'DateJoined'=>$data['date'],
               'DateCreated'=>$data['date'],
           
        ]);

inside this methods

 public function insertm(Request $request, $id)
    {
    $data = $request->all()->toArray();
    return member::create([
            'Name' => $data['name'],
             'Team' => $data['Team'],
              'Vendor' => $data['Vendor'],
              'DateJoined'=>$data['date'],
               'DateCreated'=>$data['date'],
           
        ]);
    }

OR

 public function insertm(Request $request, $id)
    {   

    //First Validate here

    //Then Save here
    return member::create([
            'Name' => $request->Name,
             'Team' => $request->Team,
              'Vendor' => $request->Vendor,
              'DateJoined'=>$request->date,
               'DateCreated'=>$request->date,
           
        ]);
    }

hope it helps

samalapsy left a reply on MethodNotAllowedHttpException In RouteCollection.php Line 218: • 2 months ago

It is displaying the data which i have entered but it is not saving in database.

@cviv Yeah you're right

@jhansi dd($request->all()); is to check if the method is receiving your Data. So with this output, It's receiving your data.

You have to validate the request using Validator::make($request, [rules]).

save the Variables into your DB.

Please can your paste your Model Code for members here? Let's see what you've got

Thanks

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.