dimanche 1 juillet 2018

using React Native with Laravel

I need help regarding how to create an react native app of a project which is already made in the Laravel framework. As I am going to make a Laravel website. So I also want to create an IOS and Android app for it. Can anyone suggest me something for it strong text



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2KEiVQa
via IFTTT

Laravel 5.6 - Route not found

I am using Laravel 5.6 and trying to create a simple form to create a post. I have my web routes that looks like this..

Route::resource('posts', 'PostsController')->middleware('auth');

My form looks like this...

<form action="" method="POST">
    <input name="title" type="text">
</form>

And my PagesController looks like this

public function store(Request $request)
    {
        $page = new Page;
        $title = $request->input('title');
        $page->save();
    }

But I am getting the following error message..

Route [pages@store] not defined

Where am I going wrong?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2NdWD6v
via IFTTT

ErrorException Undefined variable while passing variable from controllers to blade file

The index method of my controller is in the image controller. And the view welcome.blade.php is in the image welcome.blade.php. I can't find solution anywhere. What did I do wrong?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2NaPYd8
via IFTTT

users and invoices table in a foreach loop

consider a real life situation whereby tenants pays for rent invoices in partial amounts so i am building a system whereby the for loop of payment shows as in the table below, so any help from geeks on how i should go about the layout will be much appreciated, i have tried a foreach loop and currently this is what i have 0

8453

1

8453

2

8453

3

8453

0

7976

0

7382

1

7382

0

5954

1

5954

enter image description here



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2IGiXSF
via IFTTT

Laravel Translatable factory seeding with dynamic locales

I want to factory seed a translatable model without hardcoding the locales.

There are two values that I have to seed, slug which is not translatable, and title which has to be translated to all the languages from the languages table.

Here is the factory file:

$factory->define(App\Category::class, function (Faker $faker) {

 $counter = 1;
 $locales = Language::pluck('lang'); //returns hr,en,de
 $titles = [];

 foreach ($locales as $locale) {
    $titles[$locale] = [
        'title' => 'Title for category-' .$counter++. ' on '. $locale . ' language'
    ];
 }

/*
$titles = 
     "hr" => array:1 [
        "title" => "Title for category-1 on hr language"
     ]
     "en" => array:1 [
        "title" => "Title for category-2 on en language"
      ...
 */

return [
    'slug' => 'category-'.$counter++,
    $titles
];
});

This gives me an error:

Column not found: 1054 Unknown column 'hr'

Query created by the factory:

insert in to category_translations (locale, hr, en, de, test, category_id) values (0, Title for category-1 on hr language, Title for category-2 on en language, Title for category-3 on de languag e, Title for category-4 on test language, 20))



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2tHw0i8
via IFTTT

Creating a group with add member with system in laravel

I am developing a project using laravel 5.6 where there is requirement of group, were user can create a group, add member or send invitation to user via email and post to group and can have group chat function also.

I want to complete this module ASAP, so I am looking for laravel packages. I have tried "teamwork" package and "groups" package.

I need some suggestions regarding the package which can be helpful to complete the module ASAP



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2IKHJBm
via IFTTT

Loop through object within an array Laravel

I'm trying to loop through an object in an array in Laravel.

I made a foreach to loop through my $request->newTags what is an object and I just return the key. my goal is to access each tag_name in my request object what has an array with the multiple indexes what contain the tag_name.

foreach ($request->newTags as $tag) {
   return $tag;
 }

and i get my response enter image description here

how can I access each tag_name?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2KAEHRT
via IFTTT